frictionless-darwin-core
frictionless-darwin-core copied to clipboard
Support for Darwin Core Archives without metafile
According to the standard, you can have a perfectly valid DwC-A without a meta.xml
given that:
- there's only a (core) data file
- that data file has one header row
- the Metadata is kept in a file named EML.xml
I tried to convert a test archive, but I got:
Traceback (most recent call last):
File "/anaconda/envs/fdwca_pip_test/bin/fdwca", line 10, in <module>
sys.exit(cli())
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/FrictionlessDarwinCore/fdwca.py", line 13, in cli
da.save(outpath)
File "/anaconda/envs/fdwca_pip_test/lib/python3.7/site-packages/FrictionlessDarwinCore/archive.py", line 74, in save
zf.writestr('readme.md', self.metadata.as_markdown())
AttributeError: 'NoneType' object has no attribute 'as_markdown'
In a first step, I suggest to have a more explicit error saying 'no meta.xml found'.