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

CI tests fail to run on Windows #58

Closed
jaraco opened this issue Oct 9, 2020 · 2 comments
Closed

CI tests fail to run on Windows #58

jaraco opened this issue Oct 9, 2020 · 2 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Oct 9, 2020

After adding Windows CI support through Azure Pipelines, I find the project fails to run with this traceback:

Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\cli\base_command.py", line 228, in _main
    status = self.run(options, args)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\commands\install.py", line 245, in run
    options.use_user_site = decide_user_install(
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\commands\install.py", line 664, in decide_user_install
    if site_packages_writable(root=root_path, isolated=isolated_mode):
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\commands\install.py", line 609, in site_packages_writable
    get_lib_location_guesses(root=root, isolated=isolated))
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\commands\install.py", line 600, in get_lib_location_guesses
    scheme = distutils_scheme('', user=user, home=home, root=root,
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\pip\_internal\locations.py", line 109, in distutils_scheme
    d.parse_config_files()
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\distutils\dist.py", line 406, in parse_config_files
    parser.read(filename)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\configparser.py", line 697, in read
    self._read(fp, filename)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\configparser.py", line 1017, in _read
    for lineno, line in enumerate(fp, start=1):
  File "C:\hostedtoolcache\windows\Python\3.8.5\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 82: character maps to <undefined>

It fails on the python -m pip install tox step when pip notices there's a setup.cfg file so tries to read it using distutils and chokes when it finds a character that's not in codepage 1252. For crying out loud; what year is it?

@jaraco
Copy link
Owner Author

jaraco commented Aug 19, 2022

Now that the issue is fixed in pip, it's failing with the same error in setuptools_scm:

    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-7xz4eosx\overlay\Lib\site-packages\setuptools_scm\integration.py", line 113, in infer_version
      dist_name = _read_dist_name_from_setup_cfg()
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-7xz4eosx\overlay\Lib\site-packages\setuptools_scm\_integration\setuptools.py", line 17, in read_dist_name_from_setup_cfg
      parser.read([input])
    File "C:\hostedtoolcache\windows\Python\3.10.6\x64\lib\configparser.py", line 698, in read
      self._read(fp, filename)
    File "C:\hostedtoolcache\windows\Python\3.10.6\x64\lib\configparser.py", line 1021, in _read
      for lineno, line in enumerate(fp, start=1):
    File "C:\hostedtoolcache\windows\Python\3.10.6\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 62: character maps to <undefined>
  [end of output]

@jaraco
Copy link
Owner Author

jaraco commented Dec 17, 2022

After addressing the issue upstream in setuptools_scm, I see the non-ascii in setup.cfg is still triggering a failure in pip when it calls into its vendored version of distutils. There's almost no hope in fixing that, so I'm just going to declare failure and disable the test permanently.

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