2016-12-01 13:52:26 |
Zarrouk Mohamed |
description |
If a ressource has a non-ascii name (chineese name: 华为技术公司), ospurge faills with :
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128) |
If a ressource has a non-ascii name (chineese name: 华为技术公司), ospurge faills with following traceback (for this example i created a network with the chineese name):
* Resources type: NeutronNetworks
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/zarrouk/ospurge/ospurge/client.py", line 872, in <module>
main()
File "/home/zarrouk/ospurge/ospurge/client.py", line 850, in main
args.insecure, **data)
File "/home/zarrouk/ospurge/ospurge/client.py", line 662, in perform_on_project
res_actions[action]()
File "ospurge/base.py", line 167, in dump
print(self.resource_str(resource))
File "/home/zarrouk/ospurge/ospurge/client.py", line 268, in resource_str
return "network {} (id {})".format(net['name'], net['id'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128) |
|