matiasb / unpy2exe

Extract .pyc files from executables created with py2exe
MIT License
269 stars 58 forks source link

There was an error: 'NoneType' object has no attribute 'data' #3

Closed GHXST01 closed 6 years ago

GHXST01 commented 7 years ago

I'm trying to unpack a python generated .exe However when using unpy2exe I keep getting: There was an error: 'NoneType' object has no attribute 'data'

What makes it throw this error?

Zolomon commented 7 years ago

Hi @GHXST01 and @matiasb ,

I am also receiving the same error as above. @GHXST01 , did you manage to solve it?

matiasb commented 7 years ago

Hi, Do you have a sample .exe I can take a look at? Also, which Python version are you running? Thanks.

notvelleda commented 7 years ago

I'm having this problem too

tennc commented 6 years ago

python unpy2exe -o 123 "d:\b.exe" There was an error: 'NoneType' object has no attribute 'data'

C:\python27-x64\Scripts λ "C:\python27-x64\python.exe" unpy2exe -o 123 "d:\b.exe" There was an error: 'NoneType' object has no attribute 'data'

I'm having this problem too python3 && python2

b2az commented 6 years ago

Same. Whats happening here?

matiasb commented 6 years ago

Finally I got someone to send me an executable to reproduce this. It seems this issue is raised for example when trying unpy2exe with a pyinstaller python executable, which won't work. The only executables the tool handles (at least for now) are the ones created using py2exe.

In any case, added an extra check to ensure the executable matches the py2exe expected format (https://github.com/matiasb/unpy2exe/commit/06d849341734e8f485873be52c8aed5048573e9c).

On the other hand, if you are dealing with a pyinstaller executable maybe you can try with: https://sourceforge.net/projects/pyinstallerextractor/