ckanext-xloader
ckanext-xloader copied to clipboard
[WIP] Handle umlaut in resource URLs
Related to #56, fix the encoding problem:
Traceback (most recent call last):
File "/home/ckanuser/pyenv/bin/paster", line 11, in <module>
sys.exit(run())
File "/home/ckanuser/pyenv/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/home/ckanuser/pyenv/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/home/ckanuser/pyenv/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/home/ckanuser/web/ckanext/ckanext-xloader/ckanext/xloader/cli.py", line 74, in command
self._submit_all()
File "/home/ckanuser/web/ckanext/ckanext-xloader/ckanext/xloader/cli.py", line 145, in _submit_all
self._submit_package(p_id, user, indent=2)
File "/home/ckanuser/web/ckanext/ckanext-xloader/ckanext/xloader/cli.py", line 166, in _submit_package
self._submit_resource(resource, user, indent=indent + 2)
File "/home/ckanuser/web/ckanext/ckanext-xloader/ckanext/xloader/cli.py", line 190, in _submit_resource
.format(dataset=dataset_ref, r=resource, indent=' ' * indent))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 83: ordinal not in range(128)
@metaodi This looks basically great - is there a reason it's still marked WIP?
@davidread oh let me check and resolve the conflicts. No real reason other than changed priorities :wink:
Is this still needed under Python 3? If so, @metaodi merge conflicts will need to be resolved.