[Bug 258385] New: python help modules throws "UnboundLocalError: local variable 'given_files' referenced before assignment"
https://bugzilla.novell.com/show_bug.cgi?id=258385 Summary: python help modules throws "UnboundLocalError: local variable 'given_files' referenced before assignment" Product: openSUSE 10.2 Version: Final Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: koenig@linux.de QAContact: qa@suse.de using python-2.5-19.2 throws an exception when typing help() modules
help()
Welcome to Python 2.5! This is the online help utility. [...] help> modules Please wait a moment while I gather a list of all available modules... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.5/site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "/usr/lib64/python2.5/pydoc.py", line 1645, in __call__ self.interact() File "/usr/lib64/python2.5/pydoc.py", line 1663, in interact self.help(request) File "/usr/lib64/python2.5/pydoc.py", line 1679, in help elif request == 'modules': self.listmodules() File "/usr/lib64/python2.5/pydoc.py", line 1797, in listmodules ModuleScanner().run(callback) File "/usr/lib64/python2.5/pydoc.py", line 1848, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/usr/lib64/python2.5/pkgutil.py", line 110, in walk_packages __import__(name) File "/usr/lib64/python2.5/site-packages/PIL/__init__.py", line 1342, in <module> File "/usr/lib64/python2.5/site-packages/PIL/__init__.py", line 927, in main UnboundLocalError: local variable 'given_files' referenced before assignment
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |jmatejek@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 jmatejek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from jmatejek@novell.com 2007-03-28 09:37 MST ------- looks like a bug in PIL -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 jmatejek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |koenig@linux.de ------- Comment #2 from jmatejek@novell.com 2007-03-29 12:34 MST ------- Can't reproduce it in here. However, i just checked in a new version of PIL. Please upgrade to newest python and python-imaging packages from FACTORY and report if the error is still there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 ------- Comment #3 from jmatejek@novell.com 2007-04-10 07:15 MST ------- okay, it's not a bug in PIL after all. please tell me which python packages you have installed -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
okay, it's not a bug in PIL after all.
please tell me which python packages you have installed
https://bugzilla.novell.com/show_bug.cgi?id=258385 koenig@linux.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|koenig@linux.de | ------- Comment #4 from koenig@linux.de 2007-04-10 16:33 MST ------- (In reply to comment #3) this is a x86_64 (64 bit) installation, just in case that might matter...
uname -a Linux harald 2.6.18.8-0.1-default #1 SMP Fri Mar 2 13:51:59 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
rpm -qa | grep -i python | sort dbus-1-python-0.71-28 gnome-python-desktop-2.16.0-36 libxml2-python-2.6.26-29 python-2.5-19.2 python-32bit-2.5-19.2 python-cairo-1.2.2-18 python-cairo-devel-1.2.2-18 python-devel-2.5-19 python-elementtree-1.2.6-41 python-gdbm-2.5-19 python-gnome-2.16.0-15 python-gnome-devel-2.16.0-15 python-gobject2-2.12.2-11 python-gobject2-devel-2.12.2-11 python-gtk-2.10.3-11 python-gtk-devel-2.10.3-11 python-imaging-1.1.5-43 python-kid-0.9.3-27 python-numeric-24.2-36 python-orbit-2.14.1-11 python-orbit-devel-2.14.1-11 python-qt-3.5.5-29 python-sqlite-1.1.8-11 python-tk-2.5-19 python-urlgrabber-3.1.0-18 python-xml-2.5-19 rpm-python-4.4.2-76
rpm -r /s102_32/ -qa | grep -i python | sort dbus-1-python-0.71-28
the last open() calls from python shown with strace: 7689 open("/usr/lib64/python2.5/lib-dynload/zlib.so", O_RDONLY) = 16 7689 open("/usr/lib64/python2.5/lib-dynload/zlib.so", O_RDONLY) = 17 7689 open("/usr/lib64/python2.5/lib-dynload/cPickle.so", O_RDONLY) = 16 7689 open("/usr/lib64/python2.5/lib-dynload/cPickle.so", O_RDONLY) = 17 7689 open("/usr/lib64/python2.5/site.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pydoc.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pydoc.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pydoc.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pydoc.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pydoc.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/pkgutil.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/site-packages/PIL/__init__.py", O_RDONLY) = 3 7689 open("/usr/lib64/python2.5/site-packages/PIL/__init__.py", O_RDONLY) = 3 I just tried the same in a 10.2 32bit installation (via chroot from the 10.2 64bit system): here, python "help() modules" works just fine, even with python-imageing installed on 32bit: libxml2-python-2.6.26-29 python-2.5-19.2 python-cairo-1.2.2-18 python-devel-2.5-19 python-elementtree-1.2.6-41 python-gdbm-2.5-19 python-gobject2-2.12.2-11 python-gtk-2.10.3-11 python-imaging-1.1.5-43 python-kid-0.9.3-27 python-numeric-24.2-36 python-orbit-2.14.1-11 python-qt-3.5.5-29 python-sqlite-1.1.8-11 python-tk-2.5-19 python-urlgrabber-3.1.0-18 python-xml-2.5-19 rpm-python-4.4.2-76 so maybe this is a 64bit issue ? did you test on 64bit ? or only 32bit ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 jmatejek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |koenig@linux.de ------- Comment #5 from jmatejek@novell.com 2007-04-16 11:23 MST ------- hmm. thanks for the info, but it didn't seem to help, i still can't reproduce the bug on 32bit or on 64bit. please do this and send results:
grep -rl "given_files" /usr/lib64/python2.5/*
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 ------- Comment #6 from jmatejek@novell.com 2007-04-16 11:28 MST ------- Created an attachment (id=131480) --> (https://bugzilla.novell.com/attachment.cgi?id=131480&action=view) patch to file pkgutil.py from package python-2.5 Or you can apply this patch to /usr/lib64/python2.5. Then python should tell you which module is causing the problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 ------- Comment #7 from koenig@linux.de 2007-04-16 11:34 MST ------- (In reply to comment #5)
hmm. thanks for the info, but it didn't seem to help, i still can't reproduce the bug on 32bit or on 64bit.
please do this and send results:
grep -rl "given_files" /usr/lib64/python2.5/*
/usr/lib64/python2.5/site-packages/unsermake/__init__.py /usr/lib64/python2.5/site-packages/unsermake/__init__.pyc /usr/lib64/python2.5/site-packages/unsermake/__init__.pyo -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 koenig@linux.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|koenig@linux.de | ------- Comment #8 from koenig@linux.de 2007-04-16 11:37 MST ------- (In reply to comment #6)
Created an attachment (id=131480) --> (https://bugzilla.novell.com/attachment.cgi?id=131480&action=view) [edit] patch to file pkgutil.py from package python-2.5
Or you can apply this patch to /usr/lib64/python2.5. Then python should tell you which module is causing the problem.
voila: .. opening 'smart.plugins' opening 'smart.util' opening 'sqlite' opening 'unsermake' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.5/site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "/usr/lib64/python2.5/pydoc.py", line 1645, in __call__ self.interact() File "/usr/lib64/python2.5/pydoc.py", line 1663, in interact self.help(request) File "/usr/lib64/python2.5/pydoc.py", line 1679, in help elif request == 'modules': self.listmodules() File "/usr/lib64/python2.5/pydoc.py", line 1797, in listmodules ModuleScanner().run(callback) File "/usr/lib64/python2.5/pydoc.py", line 1848, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/usr/lib64/python2.5/pkgutil.py", line 111, in walk_packages __import__(name) File "/usr/lib64/python2.5/site-packages/PIL/__init__.py", line 1342, in <modu le> File "/usr/lib64/python2.5/site-packages/PIL/__init__.py", line 927, in main UnboundLocalError: local variable 'given_files' referenced before assignment
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 ------- Comment #9 from koenig@linux.de 2007-04-16 11:43 MST ------- (In reply to comment #8)
/usr/lib64/python2.5/site-packages/unsermake/__init__.py
opening 'unsermake' Traceback (most recent call last):
rpm -qf /usr/lib64/python2.5/site-packages/unsermake/__init__.py unsermake-0.4_20060307-32
some more details about 32 vs. 64 bit: the unsermake package was not installed on my 32bit system. after installing unsermake on 32bit, the same problem shows up on 32bit too. trying to remove unsermake as a temporary workaround gives # rpm -e unsermake error: Failed dependencies: unsermake is needed by (installed) kdelibs3-devel-3.5.5-45.4.x86_64 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 ------- Comment #10 from jmatejek@novell.com 2007-04-16 11:46 MST ------- okay, thanks for cooperation. i'm turning this over to unsermake maintainer. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 jmatejek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmatejek@novell.com AssignedTo|jmatejek@novell.com |coolo@novell.com Status|ASSIGNED |NEW ------- Comment #11 from jmatejek@novell.com 2007-04-16 11:47 MST ------- Stephan, you have two bugs here: - one that Harald described, unsermake causing a breakage in python's help() - installation bug in unsermake - the compiled .pyc files have to contain full path (/usr/lib64/python2.5/site-packages/unsermake) for backtraces to be displayed correctly. I'll be probably opening a catch-all bugreport for the latter problem, because it is quite common. Feel free to contact me if you have any problems. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 jmatejek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|x86-64 |All Summary|python help modules throws |python help modules throws "UnboundLocalError: |"UnboundLocalError: local |local variable 'given_files' referenced before |variable 'given_files' |assignment" when unsermake is present |referenced before | |assignment" | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 coolo@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |jmatejek@novell.com ------- Comment #12 from coolo@novell.com 2007-05-04 06:40 MST ------- why is modules calling the main function in the module? The error is real, but even if I fix it, it will complain that it wasn't called with the correct arguments. Is there anything I can do? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=258385 coolo@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|jmatejek@novell.com | Resolution| |FIXED ------- Comment #13 from coolo@novell.com 2007-05-04 06:51 MST ------- ok, never mind. Found the problem. I close the bug at hand, please write to opensuse-packagers how to correctly install python modules - I have no idea about your absolute path comment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com