I'm wrong about the encoding stuff. Maybe Kenneth can respond. There must be a different type of string in the list. I'll look around in the code to see if there is a standard way of handling it...
On Tue, Jan 24, 2017 at 10:25 AM Robert Schmidt <[email protected]> wrote: > Do you really need to upload the test report? If you need to share > something just gist the build log. > > It is also clearly a bug and not too difficult to fix. I think you can > just add a u to the beginning of '\n' > > so u'\n'.join(test_report) > > there must be a non-ascii string somewhere in there. Not sure where > exactly, but by default it would be smarter to handle these strings as > unicode anyway. > > On Tue, Jan 24, 2017 at 10:14 AM Maxime Boissonneault < > [email protected]> wrote: > > Hi all, > > Even when a build is successful, if my LANG is set to fr_CA.UTF-8, > Python fails with what appears to be a decoding error of some accent : > > > == Results of the build can be found in the log file(s) > /tmp/eb-_h4iDk/easybuild-Python-3.5.2-20170124.151206.yDGdP.log > Traceback (most recent call last): > File > "/cvmfs/ > soft.computecanada.ca/nix/store/rb2iq6l2a3hfli482jcjd4i2rls7lgqn-python-2.7.13/lib/python2.7/runpy.py > ", > line 174, in _run_module_as_main > "__main__", fname, loader, pkg_name) > File > "/cvmfs/ > soft.computecanada.ca/nix/store/rb2iq6l2a3hfli482jcjd4i2rls7lgqn-python-2.7.13/lib/python2.7/runpy.py > ", > line 72, in _run_code > exec code in run_globals > File > "/cvmfs/ > soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/main.py > ", > line 443, in <module> > main() > File > "/cvmfs/ > soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/main.py > ", > line 412, in main > ecs_with_res = build_and_install_software(ordered_ecs, > init_session_state, exit_on_failure=exit_on_failure) > File > "/cvmfs/ > soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/main.py > ", > line 134, in build_and_install_software > test_report_txt = create_test_report(test_msg, [(ec, ec_res)], > init_session_state) > File > "/cvmfs/ > soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/tools/testing.py > ", > line 231, in create_test_report > return '\n'.join(test_report) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > 364: ordinal not in range(128) > > > > Any idea how to fix this ? As a workaround, I'm setting LANG=en. > > > -- > --------------------------------- > Maxime Boissonneault > Analyste de calcul - Calcul Québec, Université Laval > Président - Comité de coordination du soutien à la recherche de Calcul > Québec > Team lead - Research Support National Team, Compute Canada > Instructeur Software Carpentry > Ph. D. en physique > >

