Message415234
In case it helps anyone:
On Windows 3.11.0a5+ the full traceback is:
$ ./python.bat demo.py
Running Debug|x64 interpreter...
Traceback (most recent call last):
File "...\demo.py", line 23, in <module>
sys.exit(main())
^^^^^^
File "...\Lib\contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\demo.py", line 11, in _tmp_path
yield pathlib.Path(tmp_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\demo.py", line 18, in main
import module
^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1080, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1487, in find_spec
File "<frozen importlib._bootstrap_external>", line 1459, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1596, in find_spec
File "<frozen importlib._bootstrap_external>", line 1656, in _fill_cache
TypeError: a bytes-like object is required, not 'str'
And on cygwin 3.8.12:
$ python demo.py
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 1346, in _path_importer_cache
KeyError: b'/tmp/tmprpymgive'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "demo.py", line 23, in <module>
sys.exit(main())
File "demo.py", line 18, in main
import module
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 914, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1407, in find_spec
File "<frozen importlib._bootstrap_external>", line 1376, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1348, in _path_importer_cache
File "<frozen importlib._bootstrap_external>", line 1324, in _path_hooks
File "<frozen importlib._bootstrap_external>", line 1594, in path_hook_for_FileFinder
File "<frozen importlib._bootstrap_external>", line 1469, in __init__
File "<frozen importlib._bootstrap_external>", line 177, in _path_isabs
TypeError: startswith first arg must be bytes or a tuple of bytes, not str |
|
Date |
User |
Action |
Args |
2022-03-15 11:03:37 | eric.smith | set | recipients:
+ eric.smith, graingert |
2022-03-15 11:03:37 | eric.smith | set | messageid: <1647342217.51.0.13879680728.issue47025@roundup.psfhosted.org> |
2022-03-15 11:03:37 | eric.smith | link | issue47025 messages |
2022-03-15 11:03:37 | eric.smith | create | |
|