Closed davidorme closed 2 months ago
The current publication workflow breaks when the XML configuration is missing and the XML file creation is requested.
safedata_zenodo publish_dataset Hardwick_microclimate_2ndOrder.json Hardwick_microclimate_2ndOrder.xlsx -e Microclimate1319.Rdata Microclimate1319.csv -n 51399 - Configuring Resources - Configuring resources from site_path: /etc/xdg/safedata_validator/safedata_validator.cfg - Validating gazetteer: /srv/safedata_validator/gazetteer.geojson - Validating location aliases: /srv/safedata_validator/location_aliases.csv - Validating GBIF database: /srv/safedata_validator/gbif_backbone_2023-08-28.sqlite - Validating NCBI database: /srv/safedata_validator/ncbi_taxonomy_2024-02-01.sqlite - Validating project database: /srv/safedata_validator/safe_projects_complete.csv Preparing new version of deposit 51399 - Removing outdated files: BaitShapefile.zip, Test_format_good_all_features.xlsx, BaitImages.zip, 51399_GEMINI.xml - Uploading new or updated files: Hardwick_microclimate_2ndOrder.xlsx, Microclimate1319.Rdata, Microclimate1319.csv Deposit created: 80969 Traceback (most recent call last): File "/home/validate/.local/bin/safedata_zenodo", line 8, in <module> sys.exit(_safedata_zenodo_cli()) File "/home/validate/.local/lib/python3.10/site-packages/safedata_validator/entry_points.py", line 992, in _safedata_zenodo_cli publish_id, publish_url = publish_dataset( File "/home/validate/.local/lib/python3.10/site-packages/safedata_validator/zenodo.py", line 1084, in publish_dataset xml_content = generate_inspire_xml( File "/home/validate/.local/lib/python3.10/site-packages/safedata_validator/zenodo.py", line 915, in generate_inspire_xml xml = template.render(context_dict) File "/home/validate/.local/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/home/validate/.local/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/validate/.local/lib/python3.10/site-packages/safedata_validator/templates/gemini_xml_template.xml", line 264, in top-level template code {% for topic in topicCategories %} TypeError: 'NoneType' object is not iterable
This should fail elegantly.
The current publication workflow breaks when the XML configuration is missing and the XML file creation is requested.
This should fail elegantly.