[linux-support] wieder mal python import pfade

Markus Wernig wernigm at lugbe.ch
Fri Jan 27 12:15:37 CET 2012


Hallo allerseits

Bei mir crasht das printer-applet-kde reproduzierbar.
Das Applet ist in Python, und ich frage mich wieder mal, wie man das
debuggen könnte. Es muss doch möglich sein, herauszufinden, warum es
immer abbricht:

$ /usr/bin/printer-applet-kde
KCrash: Application 'printer-applet-kde' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/markus/.kde4/socket-envy/kdeinit4__0

Anbei meine Versuche, dem Problem auf den Grund zu gehen. Da
statereason.py installiert ist, erhebt sich wieder die Frage, nach
welchen Kriterien python in welchen Pfaden nach Modulen sucht.

Hat jemand noch Ideen, wie man das weiter debuggen könnte?

$ python -m trace --count /usr/bin/printer-applet-kde
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib64/python2.7/trace.py", line 827, in <module>
    main()
  File "/usr/lib64/python2.7/trace.py", line 815, in main
    t.runctx(code, globs, globs)
  File "/usr/lib64/python2.7/trace.py", line 521, in runctx
    exec cmd in globals, locals
  File "/usr/bin/printer-applet-kde", line 66, in <module>
    from statereason import StateReason
ImportError: No module named statereason

$ locate statereason.py
/usr/share/apps/printer-applet/statereason.py
/usr/share/system-config-printer/statereason.py

$ equery b statereason.py
 * Searching for statereason.py ...
app-admin/system-config-printer-common-1.3.7
(/usr/share/system-config-printer/statereason.py)
kde-base/printer-applet-4.8.0
(/usr/share/apps/printer-applet/statereason.py)

$ ls -l /usr/share/apps/printer-applet/statereason.py
-rw-r--r-- 1 root root 4932 Jan 27 11:13
/usr/share/apps/printer-applet/statereason.py

$ ls -l /usr/share/system-config-printer/statereason.py
-rw-r--r-- 1 root root 6159 Jan 27 11:13
/usr/share/system-config-printer/statereason.py

thx /markus

-- 
Markus Wernig
Präsident LugBE
GPG: CA558BF7
---------------------------------------------
Linux User Group Bern - http://lugbe.ch
---------------------------------------------




More information about the Linux-support mailing list