dimaqq · GitHub

Bug report

Bug description:

# test/test_unit.py
with open("/tmp/foo") as e: ...

Run it with e.g.

sudo -E time env PYTHONPATH=src python -m profiling.sampling test/test_unit.py 1 1

Prints:

Profiler coordinator error: Script file not found: /code/jgol/peer/test/test_unit.py

While the actual error is:

> sudo -E time env PYTHONPATH=src python test/test_unit.py 1 1
Traceback (most recent call last):
  File "/code/jgol/peer/test/test_unit.py", line 16, in <module>
    with open("/tmp/foo") as e:
         ~~~~^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/foo'

CPython versions tested on:

3.15

Operating systems tested on:

macOS

Linked PRs

Read the original on github.com ↗