Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyc compile error
#3
(12-13-2017, 08:42 PM)Ofnuts Wrote:
(12-13-2017, 04:00 PM)look Wrote: Hi
not enough information online - so i ask it here.
the issue:
i have a .py script that run fine on gimp.
when trying to compile it with "-m compileall" - i get an error:
#########################################
Error processing line 3 of c:\Program Files\GIMP 2\Python\lib\site-packages\pygtk.pth:

  Traceback (most recent call last):
    File "c:\Program Files\GIMP 2\Python\lib\site.py", line 152, in addpackage
      exec line
    File "<string>", line 1, in <module>
  ImportError: No module named runtime

Remainder of file ignored
Compiling myscript.py ...
#################################

the compile produce a .pyc file, but when gimp trying to load it - it crash with similar error or 
"runtime" module missing... 

I was trying to compile other gimp python scripts  - with same result.
i remember that in ubuntu i tried it once , few months ago, and it was fine.

can someone help with this issue?

On Linux, /usr/lib/python2.7/dist-packages/pygtk.pth contains

Code:
gtk-2.0

So, no line 3, no import...

What happens if you rename the file to "pygtk.pth.disabled"?

What are you trying to achieve by compiling your Python?

I just want to obscure the code a little. nothing more.
well, to remove this line is great... but why it is compiled in first place? 
what is this file? why gimp include it?
if its a bug - need to be removed.
currently, in version 2.8.22 - can't compile any of the py scripts.
Reply


Messages In This Thread
pyc compile error - by look - 12-13-2017, 04:00 PM
RE: pyc compile error - by Ofnuts - 12-13-2017, 08:42 PM
RE: pyc compile error - by look - 12-13-2017, 08:50 PM
RE: pyc compile error - by Ofnuts - 12-13-2017, 10:56 PM

Forum Jump: