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
A package that contains Unicode characters, for example, someone's name in authors which auto collected from git, will not be able to install nor release.
Invoking custom build system...
Traceback (most recent call last):
File "C:\Python36_64\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python36_64\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\david\rez\core\Scripts\rez\rez-build.exe\__main__.py", line 7, in <module>
File "c:\users\david\rez\core\lib\site-packages\rez\cli\_entry_points.py", line 110, in run_rez_build
return run("build")
File "c:\users\david\rez\core\lib\site-packages\rez\cli\_main.py", line 160, in run
returncode = run_cmd()
File "c:\users\david\rez\core\lib\site-packages\rez\cli\_main.py", line 152, in run_cmd
return func(opts, opts.parser, extra_arg_groups)
File "c:\users\david\rez\core\lib\site-packages\rez\cli\build.py", line 157, in command
variants=opts.variants)
File "c:\users\david\rez\core\lib\site-packages\rezplugins\build_process\local.py", line 53, in build
install=install)
File "c:\users\david\rez\core\lib\site-packages\rez\build_process.py", line 204, in visit_variants
result = func(variant, **kwargs)
File "c:\users\david\rez\core\lib\site-packages\rezplugins\build_process\local.py", line 359, in _build_variant
variant.install(install_path)
File "c:\users\david\rez\core\lib\site-packages\rez\packages.py", line 449, in install
overrides=overrides)
File "c:\users\david\rez\core\lib\site-packages\rezplugins\package_repository\filesystem.py", line 722, in install_variant
variant = _create_variant()
File "c:\users\david\rez\core\lib\site-packages\rezplugins\package_repository\filesystem.py", line 715, in _create_variant
overrides=overrides
File "c:\users\david\rez\core\lib\site-packages\rezplugins\package_repository\filesystem.py", line 1190, in _create_variant
dump_package_data(package_data, buf=f, format_=package_format)
File "C:\Python36_64\Lib\contextlib.py", line 88, in __exit__
next(self.gen)
File "c:\users\david\rez\core\lib\site-packages\rez\serialise.py", line 72, in open_file_for_write
f.write(content)
UnicodeEncodeError: 'cp950' codec can't encode character '\u263a' in position 82: illegal multibyte sequence
Problem
A package that contains Unicode characters, for example, someone's name in
authors
which auto collected from git, will not be able to install nor release.Cause
The
UnicodeEncodeError
was firstly raised from herehttps://github.com/nerdvegas/rez/blob/def201aca819862470b879d5beb75fcf3d46f87f/src/rez/serialise.py#L71
And here is the next stop that would raise the same error
https://github.com/nerdvegas/rez/blob/def201aca819862470b879d5beb75fcf3d46f87f/src/rez/serialise.py#L88
By adding kwarg
encoding="utf-8"
resolved the problem for me, will try submit a PY2 compatible PR for this.The text was updated successfully, but these errors were encountered: