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
The human-readable header information appears to cause an exception due to windows-incompatible characters being output.
I'm attempting to run jake on a windows machine through a batch file against a conda environment.
There's a line in the batch file as follows:
conda list | jake ddt -c -q
This should pass the conda list of packages through to jake and generate the usual output. However, this throws the following exception instead:
Exception in thread Thread-1:
Traceback (most recent call last):
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\yaspin\core.py", line 360, in _spin
sys.stdout.write(out)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 187, in write_and_convert
self.write_plain_text(text, cursor, start)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u280b' in position 0: character maps to <undefined>
Traceback (most recent call last):
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Win10_64bit\.conda\envs\jake-test\Scripts\jake.exe\__main__.py", line 9, in <module>
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\jake\__main__.py", line 233, in ddt
spinner.ok("?? ")
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\yaspin\core.py", line 325, in ok
self._freeze(_text)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\yaspin\core.py", line 344, in _freeze
sys.stdout.write(self._last_frame)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 187, in write_and_convert
self.write_plain_text(text, cursor, start)
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\site-packages\colorama\ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
File "c:\users\win10_64bit\.conda\envs\jake-test\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f40d' in position 0: character maps to <undefined>
The culprit is this information at the top of the output:
�[?25h?? Collecting Dependencies
�[?25h?? Querying OSS Index
�[?25h?? Auditing results from OSS Index
If the output is set to JSON then the error no longer occurs (because that's no longer output). Note that this works when issued as a command at the command prompt as expected - it's only when it's run via a batch file that this exception is thrown, for some reason.
OS: Windows 10 Pro
Python Version: 3.6.2
Jake Version: 0.2.77
One simple option would be to strip that heading information away and only leave the reasults when '-q' is used as a switch, but the preferred option would probably be to use characters that wouldn't cause problems under windows at all.
The text was updated successfully, but these errors were encountered:
The human-readable header information appears to cause an exception due to windows-incompatible characters being output.
I'm attempting to run jake on a windows machine through a batch file against a conda environment.
There's a line in the batch file as follows:
conda list | jake ddt -c -q
This should pass the conda list of packages through to jake and generate the usual output. However, this throws the following exception instead:
The culprit is this information at the top of the output:
If the output is set to JSON then the error no longer occurs (because that's no longer output). Note that this works when issued as a command at the command prompt as expected - it's only when it's run via a batch file that this exception is thrown, for some reason.
One simple option would be to strip that heading information away and only leave the reasults when '-q' is used as a switch, but the preferred option would probably be to use characters that wouldn't cause problems under windows at all.
The text was updated successfully, but these errors were encountered: