Falldog / pyconcrete

Protect your python script, encrypt it as .pye and decrypt when import it
Apache License 2.0
702 stars 150 forks source link

run error #22

Closed vonzhou closed 7 years ago

vonzhou commented 7 years ago

Exception ImportError: 'cannot import name logging' in <module 'threading' from '/usr/lib/python2.7/threading.pye'> ignored

Falldog commented 7 years ago

Do you encrypted whole python library? Please provide more information to reproduce the issue, thanks

vonzhou commented 7 years ago

When i import logging in my python script.

Main.py: `#!/usr/bin/env python import pyconcrete import sys from m1 import m1 import logging print sys.path

m1.hello() print 'hello............'`

After encrypt and run : pyconcrete Main.pye, got : Segmentation fault (core dumped)

“import logging” matters.

Falldog commented 7 years ago

@vonzhou I had tested your content without m1 module It's okay for me

BTW, if you got segmentation fault, look like some pyconcrete library may be linked wrong. Do you build pyconcrete and exeucte at the same machine?

And what the result of command below?

$ ldd `python -c "import pyconcrete;print(pyconcrete._pyconcrete.__file__)"`
vonzhou commented 7 years ago

The output is :

$ ldd python -c "import pyconcrete;print(pyconcrete._pyconcrete.__file__)" linux-vdso.so.1 => (0x00007fff24515000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd5df6b9000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd5df2ef000) /lib64/ld-linux-x86-64.so.2 (0x00005561078a0000)

vonzhou commented 7 years ago

use pyconcrete as a lib is ok. @Falldog Thank you.