ckanext-xloader icon indicating copy to clipboard operation
ckanext-xloader copied to clipboard

[WIP] Handle umlaut in resource URLs

Open metaodi opened this issue 7 years ago • 3 comments

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 avatar Nov 07 '18 09:11 metaodi

@metaodi This looks basically great - is there a reason it's still marked WIP?

davidread avatar Nov 15 '19 15:11 davidread

@davidread oh let me check and resolve the conflicts. No real reason other than changed priorities :wink:

metaodi avatar Nov 15 '19 16:11 metaodi

Is this still needed under Python 3? If so, @metaodi merge conflicts will need to be resolved.

ThrawnCA avatar Jan 29 '24 04:01 ThrawnCA