After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676546 - Python - pygtk.pth - No module named runtime
Python - pygtk.pth - No module named runtime
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Windows Installer
2.8.0
Other Windows
: Normal normal
: 2.8
Assigned To: Jernej Simončič
Jernej Simončič
Depends on:
Blocks:
 
 
Reported: 2012-05-22 10:34 UTC by will69
Modified: 2014-02-17 00:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description will69 2012-05-22 10:34:13 UTC
Using any of the script interpreters in batch mode yields an error during Python initialization. The error is caused by the line "import runtime" in the file "pygtk.pth". As there is no such module, this line should probably be removed.

Here's how to reproduce:

gimp-2.8.exe -ib "(gimp-quit 0)" 2>stderr.log
type stderr.log:

Error processing line 3 of C:\Programme\GIMP 2\Python\lib\site-packages\pygtk.pth:

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

Remainder of file ignored

(gimp-2.8.exe:176): LibGimpBase-WARNING **: gimp-2.8.exe: gimp_wire_read(): error
Comment 1 Kevin Cozens 2012-05-23 14:22:57 UTC
I can't reproduce this under Linux so it would appear to be either a Windows specific problem or a problem with your Python installation. The file in question is part of python-gobject not part of pygimp or one of the plug-ins that come with pygimp.

Which package of Python did you install on your machine (eg. Active Python)? Have you checked to see if you are missing an environment variable (eg. PYTHONLIBS) that points to libraries/DLL files needed to run Python programs?
Comment 2 Michael Schumacher 2012-05-23 14:49:09 UTC
The current 2.8.0 installers by Jernej include Python.
Comment 3 will69 2012-05-23 19:24:47 UTC
I am using the GIMP 2.8 for Windows distribution by Jernej. You can’t reproduce this under Linux, because Python is packaged separately under Linux and the line in question is not in pygtk.pth. (And it wasn’t in GIMP 2.6 for Windows, either.) Of course you can put it there, in which case you get the error message above.

I think I am not missing any environment variables or DLLs. The problem disappears if that line is erased.
Comment 4 Max Mustermann 2012-10-17 20:07:51 UTC
Confirming this for GIMP 2.8.2 on Win 7, 32 bit (Jernejs build).

The redirected stderr output: 

** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'

(gimp-2.8.exe:1888): LibGimpBase-WARNING **: gimp-2.8.exe: gimp_wire_read(): error

I have only the Python installed that came with GIMP.
Comment 5 Michael Natterer 2014-02-07 21:49:01 UTC
Does this still happen with the latest 2.8.10 installer?
Comment 6 will69 2014-02-11 09:26:20 UTC
The offending line "import runtime" is no longer in the file "pygtk.pth". The original issue is solved. The warnings from comment 4 persist. But that would be another bug.