Hello, Am Samstag, 29. Oktober 2016, 11:11:35 CET schrieb sfalken@cloverleaf- linux.org:
Locally, my install of osc seems to be broken, any ideas what python module I'm missing, or what I need to fix here? Running on Tumbleweed
osc status Traceback (most recent call last): File "/usr/bin/osc", line 39, in <module> osccli = commandline.Osc() File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 82, in __init__ self._load_plugins() File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 8546, in _load_plugins mod = imp.load_source(modname, os.path.join(plugin_dir, extfile)) IOError: [Errno 2] No such file or directory
Python backtraces are not too helpful when it comes to variable content [1] - and without that, it's hard to find out what happened here. Please edit /usr/lib/python2.7/site-packages/osc/commandline.py and (temporarily) add a line print(modname, os.path.join(plugin_dir, extfile)) above the line that causes the error: mod = imp.load_source(modname, os.path.join(plugin_dir, extfile)) It will still crash, but before doing so, it should print the path and filename it tries to load. I just had a short look at the code - it tries to load *.py files in /usr/lib/osc-plugins, /usr/local/lib/osc-plugins/, /var/lib/osc-plugins and ~/.osc-plugins/. If I had to guess, I'd look for broken symlinks in one of these directories ;-) Regards, Christian Boltz [1] The cgitb module [2] helps a lot to get more useful backtraces, see for example the apparmor.fail module for a real-world example how it can be used. (compared to plain cgitb, apparmor.fail is slightly improved regarding user-visible output and writing a debug log.) [2] https://docs.python.org/2/library/cgitb.html -- [RFCs, Etikette] Ich weiß auch dass ich vor einigen mails dagegen verstoßen habe. Nur als assozial braucht sich keiner von dir "staatlich geprüfter Flachzange" hinstellen lassen. [Matthias Reinhardt in suse-linux] -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org