You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, looks like I’m getting Python encoding errors if my Pivotal project name has a non-ASCII character in it, specifically ‘é’ in my case.
The error:
$ pivotal_tools changelog
Select a Project:
[1] An ASCII Project Name
[2] Another ASCII Project Name
Traceback (most recent call last):
File "/usr/local/bin/pivotal_tools", line 9, in<module>
load_entry_point('pivotal-tools==0.14', 'console_scripts', 'pivotal_tools')()
File "/usr/local/lib/python2.7/dist-packages/pivotal_tools/cli.py", line 508, in main
project = prompt_project(arguments)
File "/usr/local/lib/python2.7/dist-packages/pivotal_tools/cli.py", line 353, in prompt_project
print "[{}] {}".format(idx+1, project.name)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)
The line in question:
print"[{}] {}".format(idx+1, project.name)
Adding the unicode u does fix the problem:
printu"[{}] {}".format(idx+1, project.name)
But I guess this will be a tool-wide issue. Happy to submit a PR if needed, depending on what you think the correct way to fix this is.
Cheers :)
The text was updated successfully, but these errors were encountered:
Cool. I'll get on this hopefully soon. PR are always appreciated. Is it really as simple as adding a u -- are there other approaches that we should consider?
Hey, looks like I’m getting Python encoding errors if my Pivotal project name has a non-ASCII character in it, specifically ‘é’ in my case.
The error:
The line in question:
Adding the unicode
u
does fix the problem:But I guess this will be a tool-wide issue. Happy to submit a PR if needed, depending on what you think the correct way to fix this is.
Cheers :)
The text was updated successfully, but these errors were encountered: