benfred / py-spy

Sampling profiler for Python programs
MIT License
12.13k stars 401 forks source link

Encounter os error 31 with py-spy record #632

Open Piidas opened 7 months ago

Piidas commented 7 months ago

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