I am trying to create virtualenv with make setup
and poetry in Git Bash:
$ make setup
poetry install --no-root
Creating virtualenv ad-ml in C:\Users\user1\Documents\ad_ml\.venv
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.
CalledProcessError
Command '['C:\\Users\\user1\\AppData\\Local\\Programs\\Git\\mingw64\\bin\\git.exe'
, 'clone', '--recurse-submodules', '--', 'ssh://[email protected]:7999/b2b/py_client.git',
'C:\\Users\\EMANZH~1\\AppData\\Local\\Temp\\pypoetry-git-py_clien9fdvh9lr']'
returned non-zero exit status 128.
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\_compat.py:217 in run
and get CalledProcessError with exit status 128 and another exception:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user1\Anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\user1\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\user1\AppData\Roaming\Python\Scripts\poetry.exe\__main__.py", line 7, in <module>
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\__init__.py", line 5, in main
return Application().run()
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\console_application.py", line 142, in run
trace.render(io, simple=isinstance(e, CliKitException))
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\ui\components\exception_trace.py", line 232, in render
return self._render_exception(io, self._exception)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\ui\components\exception_trace.py", line 269, in _render_exception
self._render_snippet(io, current_frame)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\ui\components\exception_trace.py", line 289, in _render_snippet
self._render_line(io, code_line)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\ui\components\exception_trace.py", line 402, in _render_line
io.write_line("{}{}".format(indent * " ", line))
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\io\io_mixin.py", line 65, in write_line
super(IOMixin, self).write_line(string, flags)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\api\io\io.py", line 66, in write_line
self._output.write_line(string, flags=flags)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\api\io\output.py", line 69, in write_line
self.write(string, flags=flags, new_line=True)
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\api\io\output.py", line 61, in write
self._stream.write(to_str(formatted))
File "C:\Users\user1\AppData\Roaming\pypoetry\venv\lib\site-packages\clikit\io\output_stream\stream_output_stream.py", line 24, in write
self._stream.write(string)
File "C:\Users\user1\Anaconda3\lib\encodings\cp1251.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 27: character maps to <undefined>
Are there any ideas how to fix this error, any help would be much appreciated.
pc windows 10, git bash 2.34.0, cloned repo with sourcetree from bitbucket, python 3.8.8
Check first if this is similar to python-poetry/poetry
issue 3297, which refers to a pypa/virtualenv
issue 1986
The first link includes (by Daniel Taylor):
We downgrade virtualenv inside the conda environment in our circle CI windows executors, not sure if it with
pip
or not.So adding a step like this to your
yml
config should fix the issue (or just addingvirtualenv=20.0.33
to the step where you install yourconda
dependencies):- run: conda install virtualenv=20.0.33
The OP Taky proposes in the comments:
I changed
dependency
link topy_client.git
inpyproject.toml
from "ssh
" to "https
", and that's worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With