Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands list and export fail for projectnames containing unicode chars #24

Open
felixlohmeier opened this issue Aug 21, 2019 · 0 comments

Comments

@felixlohmeier
Copy link

project name: unicodé

export:

$ python2 ./refine.py --export 1774315430083
/usr/lib64/python2.7/urllib.py:1298: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  return ''.join(map(quoter, s))
Traceback (most recent call last):
  File "./refine.py", line 108, in <module>
    refine_project = main()
  File "./refine.py", line 102, in main
    export_project(project, options)
  File "./refine.py", line 76, in export_project
    output.writelines(project.export(export_format=export_format))
  File "/home/felix/git/refine-client-py/google/refine/refine.py", line 432, in export
    url = ('export-rows/' + urllib.quote(self.project_name()) + '.' +
  File "/usr/lib64/python2.7/urllib.py", line 1298, in quote
    return ''.join(map(quoter, s))
KeyError: u'\xe9'

list:

$ python2 ./refine.py --list
Traceback (most recent call last):
  File "./refine.py", line 108, in <module>
    refine_project = main()
  File "./refine.py", line 93, in main
    list_projects()
  File "./refine.py", line 63, in list_projects
    print('{0:>14}: {1}'.format(project_id, project_info['name']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 6: ordinal not in range(128)

The OpenRefine GUI suggests project names without unicode chars but people are free to override the project name input field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant