simonw / symbex

Find the Python code for specified symbols
Apache License 2.0
231 stars 6 forks source link

UnicodeDecode error #17

Closed gvangool closed 1 year ago

gvangool commented 1 year ago

I tried it on my $WORK project, which includes the venv directory as a subdirectory of the main repo.

I get the following error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 81: invalid start byte

It looks like it came from IPython (the errored file is .venv/lib/python3.11/site-packages/IPython/core/tests/nonascii.py), looking at the encoding:

$ file .venv/lib/python3.11/site-packages/IPython/core/tests/nonascii.py
.venv/lib/python3.11/site-packages/IPython/core/tests/nonascii.py: ISO-8859 text
spookylukey commented 1 year ago

This is another place where you could probably benefit from the work done in pyastgrep, as mentioned here

simonw commented 1 year ago

Hah I just hit that one myself: