PyCG icon indicating copy to clipboard operation
PyCG copied to clipboard

a unexpected error about scanning binary file, (bug report)

Open LeeSureman opened this issue 3 years ago • 2 comments

Hello, I have read your work "PyCG: Practical Call Graph Generation in Python", and think it is very nice and insightful. But when I try to generate a py file's graph, which contain 'import numpy', your provided script will scan some unexpected binary files following:

/home/xnli/.conda/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-x86_64-linux-gnu.so,

I think maybe scanning binary files is not your expected behaviour of your provided script?

LeeSureman avatar Dec 31 '21 11:12 LeeSureman

Hi @LeeSureman, does this lead to an error? Typically, PyCG tries to identify the location of an imported module to deduce whether it is an internal-package module or not, to analyze it further.

vitsalis avatar Jan 02 '22 07:01 vitsalis

Thank you for response! yes, it leads to an error, I find your script will read the "/home/xnli/.conda/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-x86_64-linux-gnu.so" in numpy file by utf-8, but it is binary, so it leads to an error... how can I avoid it?

LeeSureman avatar Jan 03 '22 03:01 LeeSureman

Closing due to archival of repository.

vitsalis avatar Nov 26 '23 07:11 vitsalis