famous-xylophone-36532
09/20/2023, 3:03 PM16:58:41.31 [ERROR] 1 Exception encountered:
Engine traceback:
in `test` goal
ProcessExecutionFailure: Process 'Building local_dists.pex' failed with exit code 1.
stdout:
stderr:
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '.python-build-standalone/python/bin/python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '.python-build-standalone/python/bin/python3'
sys.base_prefix = '.python-build-standalone/python'
sys.base_exec_prefix = '.python-build-standalone/python'
sys.platlibdir = 'lib'
sys.executable = '.python-build-standalone/python/bin/python3'
sys.prefix = '.python-build-standalone/python'
sys.exec_prefix = '.python-build-standalone/python'
sys.path = [
'.python-build-standalone/python/lib/python39.zip',
'.python-build-standalone/python/lib/python3.9',
'.python-build-standalone/python/lib/python3.9/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 1362, in _path_importer_cache
KeyError: '.python-build-standalone/python/lib/python3.9'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 925, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1423, in find_spec
File "<frozen importlib._bootstrap_external>", line 1392, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1364, in _path_importer_cache
File "<frozen importlib._bootstrap_external>", line 1340, in _path_hooks
File "<frozen importlib._bootstrap_external>", line 1610, in path_hook_for_FileFinder
File "<frozen importlib._bootstrap_external>", line 1486, in __init__
FileNotFoundError: [Errno 2] No such file or directory
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
I am using a Docker environment that runs tests on x86_64
, while my mac has an M1. This error only appears when I include a specific test, and stops happening when I comment out that test. That test looks like this:
--- snipped into thread --- [2]
python_test(
name = "integration_test",
source = "integration_test.py",
runtime_package_dependencies = [
":me", # (a docker image)
],
tags = [
"integration-test",
],
environment = "__local__",
)
This test uses the Docker SDK to run a container and send it requests.
Any idea what’s going on here?famous-xylophone-36532
09/20/2023, 3:05 PMfamous-xylophone-36532
09/20/2023, 3:08 PM:me
) did not have execution_mode = "venv"
. So problem solved. Feel free to delete or maybe leave around so that people can find this thread when searching for the error message.refined-addition-53644
09/20/2023, 3:20 PMfamous-xylophone-36532
09/21/2023, 8:07 AMfamous-xylophone-36532
09/21/2023, 8:15 AM16:58:41.31 [ERROR] 1 Exception encountered:
Engine traceback:
in `test` goal
ProcessExecutionFailure: Process 'Building local_dists.pex' failed with exit code 1.
stdout:
stderr:
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '.python-build-standalone/python/bin/python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '.python-build-standalone/python/bin/python3'
sys.base_prefix = '.python-build-standalone/python'
sys.base_exec_prefix = '.python-build-standalone/python'
sys.platlibdir = 'lib'
sys.executable = '.python-build-standalone/python/bin/python3'
sys.prefix = '.python-build-standalone/python'
sys.exec_prefix = '.python-build-standalone/python'
sys.path = [
'.python-build-standalone/python/lib/python39.zip',
'.python-build-standalone/python/lib/python3.9',
'.python-build-standalone/python/lib/python3.9/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 1362, in _path_importer_cache
KeyError: '.python-build-standalone/python/lib/python3.9'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 925, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1423, in find_spec
File "<frozen importlib._bootstrap_external>", line 1392, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1364, in _path_importer_cache
File "<frozen importlib._bootstrap_external>", line 1340, in _path_hooks
File "<frozen importlib._bootstrap_external>", line 1610, in path_hook_for_FileFinder
File "<frozen importlib._bootstrap_external>", line 1486, in __init__
FileNotFoundError: [Errno 2] No such file or directory
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
famous-xylophone-36532
09/21/2023, 8:15 AMpython_test(
name = "integration_test",
source = "integration_test.py",
runtime_package_dependencies = [
":me", # (a docker image)
],
tags = [
"integration-test",
],
environment = "__local__",
)