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

UnicodeDecodeError error on Windows after upgrading from 0.5.0 to 0.6.0 #213

Closed
staticdev opened this issue Dec 27, 2020 · 1 comment · Fixed by #233
Closed

UnicodeDecodeError error on Windows after upgrading from 0.5.0 to 0.6.0 #213

staticdev opened this issue Dec 27, 2020 · 1 comment · Fixed by #233

Comments

@staticdev
Copy link
Contributor

My name has a ' on pyproject.toml see line 5:
https://github.com/staticdev/git-portfolio/blob/master/pyproject.toml

The PR to upgrade log's shows the problem:

nox > Running session tests-3.9
nox > Creating virtual environment (virtualenv) using python.exe in .nox\tests-3-9
nox > poetry build --format=wheel
nox > pip uninstall --yes file://D:/a/git-portfolio/git-portfolio/dist/git_portfolio-0.9.3-py3-none-any.whl#sha256=239968621bb1172da9e310012c62f51f342d0aea9fdb5e2463ed9cd8c868c9e1
nox > Session tests-3.9 raised exception UnicodeDecodeError('charmap', b'[tool.poetry]\nname = "git-portfolio"\nversion = "0.9.3"\ndescription = "Git Portfolio"\nauthors = ["Thiago Carvalho D\'\xc3\x81vila <thiagocavila@gmail.com>"]\nlicense = "MIT"\nreadme = "README.rst"\nhomepage = "https://github.com/staticdev/git-portfolio"\nrepository = "https://github.com/staticdev/git-portfolio"\ndocumentation = "https://git-portfolio.readthedocs.io"\nclassifiers = [\n    "Programming Language :: Python :: 3.7",\n    "Programming Language :: Python :: 3.8",\n    "Programming Language :: Python :: 3.9",\n    "License :: OSI Approved :: MIT License",\n]\n\n[tool.poetry.urls]\nChangelog = "https://github.com/staticdev/git-portfolio/releases"\n\n[tool.poetry.dependencies]\npython = "^3.7.0"\nclick = "^7.0"\ninquirer = "^2.7.0"\npyyaml = "^5.3.1"\n"github3.py" = "^1.3.0"\n\n[tool.poetry.dev-dependencies]\npytest = "^6.2.1"\ncoverage = {extras = ["toml"], version = "^5.3"}\nsafety = "^1.9.0"\nmypy = "^0.782"\ntypeguard = "^2.10.0"\nxdoctest = "^0.15.0"\nsphinx = "^3.3.1"\nsphinx-autobuild = "^2020.9.1"\npre-commit = "^2.7.1"\nflake8 = "^3.8.4"\nflake8-bandit = "^2.1.2"\nflake8-bugbear = "^20.1.4"\nflake8-docstrings = "^1.5.0"\nflake8-rst-docstrings = "^0.0.14"\npep8-naming = "^0.11.1"\ndarglint = "^1.5.5"\nreorder-python-imports = "^2.3.5"\npre-commit-hooks = "^3.3.0"\npytest_mock = "^3.3.1"\nblack = "^20.8b1"\nsphinx-click = "^2.5.0"\n\n[tool.poetry.scripts]\ngitp = "git_portfolio.__main__:main"\n\n[tool.coverage.paths]\nsource = ["src", "*/site-packages"]\n\n[tool.coverage.run]\nbranch = true\nsource = ["git_portfolio"]\n\n[tool.coverage.report]\nshow_missing = true\nfail_under = 100\n\n[build-system]\nrequires = ["poetry-core>=1.0.0"]\nbuild-backend = "poetry.core.masonry.api"\n', 116, 117, 'character maps to <undefined>')
Traceback (most recent call last):
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox\sessions.py", line 549, in execute
    self.func(session)
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox\_decorators.py", line 53, in __call__
    return self.func(*args, **kwargs)
  File "D:\a\git-portfolio\git-portfolio\noxfile.py", line 120, in tests
    session.install(".")
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox_poetry\core.py", line 152, in install
    requirements = export_requirements(session)
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox_poetry\core.py", line 49, in export_requirements
    Poetry(session).export(path)
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox_poetry\poetry.py", line 76, in export
    *[f"--extras={extra}" for extra in self.config.extras],
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox_poetry\poetry.py", line 61, in config
    self._config = Config(Path.cwd())
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\nox_poetry\poetry.py", line 24, in __init__
    text = path.read_text()
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\pathlib.py", line 1256, in read_text
    return f.read()
  File "c:\hostedtoolcache\windows\python\3.9.1\x64\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 116: character maps to <undefined>
nox > Session tests-3.9 failed.
@staticdev
Copy link
Contributor Author

staticdev commented Jan 14, 2021

UPDATE: I found an issue I reported with exactly the same error here and it was solved here.

UPDATE 2: I created a quick-fix PR.

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

Successfully merging a pull request may close this issue.

1 participant