Trying to publish a CSV file without a schema results in exception
rufuspollock opened this issue · 0 comments
rufuspollock commented
Try with dp1 fixture data and you get:
Traceback (most recent call last):
File "/Users/rgrp/.virtualenvs/fd/bin/dpmpy", line 4, in <module>
sys.exit(cli())
File "/Users/rgrp/.virtualenvs/fd/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/Users/rgrp/.virtualenvs/fd/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/Users/rgrp/.virtualenvs/fd/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/rgrp/.virtualenvs/fd/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/rgrp/.virtualenvs/fd/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/Users/rgrp/src/frictionlessdata/dpm-py/dpm/main.py", line 45, in wrapped
return f(*args, **kwargs)
File "/Users/rgrp/src/frictionlessdata/dpm-py/dpm/main.py", line 157, in publish
puburl = client.publish()
File "/Users/rgrp/src/frictionlessdata/dpm-py/dpm/client/__init__.py", line 128, in publish
self.validate()
File "/Users/rgrp/src/frictionlessdata/dpm-py/dpm/client/__init__.py", line 114, in validate
report = validate_data(self.datapackage)
File "/Users/rgrp/src/frictionlessdata/dpm-py/dpm/client/__init__.py", line 348, in validate_data
'schema': Schema(resource.descriptor['schema']),
KeyError: u'schema'
Reason is our data validation is trying to find a scheme and one isn't there.