Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry.build fails on terminals with ansi capability like conemu #779

Open
cycledriver opened this issue Jun 17, 2022 · 1 comment
Open

Comments

@cycledriver
Copy link
Contributor

cycledriver commented Jun 17, 2022

On terminals with ansi capability poetry build wraps the output artifact with ansi color escape codes. This get used for the install/unisntall call and that fails with an exception like below.

Which operating system and Python version are you using? This happens on windows 10/server 2012

Which version of this project are you using? 1.0.0

What did you do?

poetry run nox

What did you expect to see? Tests succeed

*What did you see instead? *

$ poetry run nox
nox > Running session pre-commit
nox > Session pre-commit skipped: Python interpreter 3.10 not found.
nox > Running session safety
nox > Session safety skipped: Python interpreter 3.10 not found.
nox > Running session mypy-3.10
nox > Session mypy-3.10 skipped: Python interpreter 3.10 not found.
nox > Running session mypy-3.9
nox > Creating virtual environment (virtualenv) using python3.9 in .nox\mypy-3-9
nox > poetry build --format=wheel
nox > Session mypy-3.9 raised exception OSError(22, 'The filename, directory name, or volume label syntax is incorrect')
Traceback (most recent call last):
  File "C:\Users\marc\github\nox-poetry\.venv\lib\site-packages\nox\sessions.py", line 695, in execute
    self.func(session)
  File "C:\Users\marc\github\nox-poetry\.venv\lib\site-packages\nox\_decorators.py", line 68, in __call__
    return self.func(*args, **kwargs)
  File "C:\Users\marc\github\nox-poetry\src\nox_poetry\sessions.py", line 43, in wrapper
    function(proxy, *_args, **_kwargs)
  File "C:\Users\marc\github\nox-poetry\noxfile.py", line 146, in mypy
    session.install(*deps)
  File "C:\Users\marc\github\nox-poetry\src\nox_poetry\sessions.py", line 292, in install
    return self.poetry.install(*args, **kwargs)
  File "C:\Users\marc\github\nox-poetry\src\nox_poetry\sessions.py", line 128, in install
    package = self.build_package()
  File "C:\Users\marc\github\nox-poetry\src\nox_poetry\sessions.py", line 250, in build_package
    url = wheel.resolve().as_uri()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1215, in resolve
    s = self._flavour.resolve(self, strict=strict)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 215, in resolve
    s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'dist\\\x1b[32mnox_poetry-1.0.0-py3-none-any.whl\x1b[0m'
nox > Session mypy-3.9 failed.
@cycledriver
Copy link
Contributor Author

Fix in #778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant