py-spy icon indicating copy to clipboard operation
py-spy copied to clipboard

Error: Failed to find python version from target process

Open kDaeMN opened this issue 3 years ago • 5 comments

Getting below stack when trying to use py-spy on

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

Python 2.7.18

py-spy 0.3.14

INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Found libpython binary @ /opt/XX/YYY/lib/libpython2.7.so.1.0 INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Getting version from python binary BSS INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Failed to get version from BSS section: failed to find version string INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Getting version from libpython BSS INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Failed to get version from libpython BSS section: failed to find version string INFO 2023-02-04T14:36:42Z: py_spy::python_spy: Trying to get version from path: /opt/XX/YYY/lib/EXECUTABLENAME Error: Failed to find python version from target process

kDaeMN avatar Feb 04 '23 14:02 kDaeMN

There is a similar bug: https://github.com/benfred/py-spy/issues/550

This problem also occurs on windows when calling a module entry point (executable) instead of directly calling the python interpreter

gobater avatar Feb 08 '23 09:02 gobater

I am seeing this on a bunch of module entry point executables on Python 3.10 on Windows, as above. Austin does manage to do it, so I assume it's possible.

itamarst avatar Mar 15 '23 21:03 itamarst

Be aware --subprocesses may help if you're using a venv, but doesn't help with 3.10+

ses4j avatar May 30 '23 20:05 ses4j

@gobater I assume you meant to link to this similar bug: https://github.com/benfred/py-spy/issues/498?

fleimgruber avatar Dec 14 '23 10:12 fleimgruber

@gobater I assume you meant to link to this similar bug: #498?

Yes, you are correct. I mixed it up while c&p the link

gobater avatar Dec 15 '23 07:12 gobater