Closed mcarans closed 3 years ago
Please post the full traceback
Traceback (most recent call last):
File "/home/mcarans/Programming/hdx-python-api/src/hdx/data/hdxobject.py", line 331, in _write_to_hdx
return self.configuration.call_remoteckan(self.actions()[action], data, files=files_to_upload)
File "/home/mcarans/Programming/hdx-python-api/src/hdx/hdx_configuration.py", line 307, in call_remoteckan
return self.remoteckan().call_action(*args, **kwargs)
File "/home/mcarans/Programming/VirtualEnvs/hdx-python-api/lib/python3.8/site-packages/ckanapi/remoteckan.py", line 88, in call_action
return reverse_apicontroller_action(url, status, response)
File "/home/mcarans/Programming/VirtualEnvs/hdx-python-api/lib/python3.8/site-packages/ckanapi/common.py", line 114, in reverse_apicontroller_action
emessage = err.get('message', '').split(': ', 1)[-1]
AttributeError: 'list' object has no attribute 'split'
Thanks. What's the contents of err when this happens?
{'message': [{'resources__1__upload': ['Unmatched key resources__1']}], '__type': 'Validation Error'}
interesting, this might be a bug in package_revise, none of the other actions return a list in the message value AFAIK
Do you need me to raise this in the GitHub CKAN project?
sure but it's worth fixing in ckanapi too, ckanapi shouldn't fail if it gets something it's not expecting here
If I specify an incorrect resource eg.
update__resources__1__upload
when there is only one resource, the error message processing in common.py fails with this error:on this line:
When the failure occurs "err" is: