Encounter os error 31 with py-spy record
Hi there,
I encounter the following error: Error: Failed to get process executable name. Check that the process is running. Reason: A device attached to the system is not functioning. (os error 31) Reason: A device attached to the system is not functioning. (os error 31)
I started py-spy as follows running the CMD as Administrator: py-spy record -o profile.svg -- C:\Users\ACER\AppData\Local\Programs\Python\Python310\python.exe TesterCopy.py
I get the same error when I use python 3.10.8 and 3.11.5.
I also tried to profile this python script and another one too.
I also tried my local machine (windows 11) and a virtual machine from AWS - same error.
I use py-spy version 0.3.14.
Hope not to report a stupid mistake here. Thanks for you support and all the best! Piidas
ME too . Has to do with pyenv?
Hi, I've encountered the same problem.
- Windows version:
10.0.19045.0 - PowerShell version:
7.5.0
I am in a virtual environment.
- Python version: 3.12.9
- py-spy version: 0.4.0
Minimal reproducible script simple.py:
import sys
def main() -> int:
return 0
if __name__ == "__main__":
sys.exit(main())
To reproduce run
py-spy record -o simple.svg -- python simple.py
Yes, I was completely unable to use py-spy on Windows and had to switch to a Linux machine