[Debian-med-packaging] Bug#652489: NameError: global name 'ViewerFrameworkGUI' is not defined

lina lina.lastname at gmail.com
Sun Dec 18 16:02:00 UTC 2011


On Sun, Dec 18, 2011 at 11:41 PM, Andreas Tille <andreas at an3as.eu> wrote:
> On Sun, Dec 18, 2011 at 11:24:50PM +0800, lina wrote:
>> $ cat /usr/lib/python2.7/dist-packages/ViewerFramework/VF.py | grep
>> ViewerFrameworkGUI
>>     from ViewerFramework.VFGUI import ViewerFrameworkGUI
>>             self.GUI = ViewerFrameworkGUI(self, title=title,
>>
>> see there is a ViewerFrameworkGUI in the VF.py script.
>>
>> well... before due to historical reason, when you have python2.6
>> there, there is a VF.py
>> this one use ViewerFramework(self, ...) which why the wrong message
>> saying: global name 'ViewerFrameworkGUI' is not defined
>>
>> VF.py which is linked to /usr/share/pyshared/ViewerFramework/VF.py
>
> Yes.  It is the Python debhelper method which installs the following:
>
> $ apt-file search "/VF.py"
> mgltools-viewerframework: /usr/lib/python2.6/dist-packages/ViewerFramework/VF.py
> mgltools-viewerframework: /usr/lib/python2.7/dist-packages/ViewerFramework/VF.py
> mgltools-viewerframework: /usr/share/pyshared/ViewerFramework/VF.py


seriously, why I use apt-file search "/VF.py", showed me nothing,

$ apt-file search "/VF.py"
$ apt-file search "/VF.py"

$ ls -l /usr/lib/python2.6/dist-packages/ViewerFramework/VF.py
lrwxrwxrwx 1 root root 48 Sep 27 17:47
/usr/lib/python2.6/dist-packages/ViewerFramework/VF.py ->
../../../../share/pyshared/ViewerFramework/VF.py


$ ls -l /usr/lib/python2.7/dist-packages/ViewerFramework/VF.py
lrwxrwxrwx 1 root root 48 Sep 27 17:47
/usr/lib/python2.7/dist-packages/ViewerFramework/VF.py ->
../../../../share/pyshared/ViewerFramework/VF.py


all is symbolic link to one VF.py.


>
> where the Python modules will be byte compiled for each Python version
> separately.  So I can not really see a reason why in your case the
> script failed.
>
>> I guess it's related to the update of VF.py (might be wrong)
>>
>> >
>> > Sorry, I can not reproduce the problem on my machine and I would like
>> > to see the problem reasonable understood before closing the bug.
>> you may remove all python and tried to monitor the VF.py under
>> /usr/share/pyshared/ViewerFramework/ when some version of python was
>> installed.
>
> From my point of view this will end up in wild guessing.  The error
> message you sended seemed not related to Python 2.6 and removing Python
> 2.6 as a fix seemed strange.  In principle autodocktools should work
Not strange in my box.
> with both Python 2.6 and 2.7 and the installation method described above

Have you checked the VF.py in 2.6 and 2.7, just grep ViewerFrameworkGUI,

before removal of python2.6, there is none ViewerFrameworkGUI in my
VF.py even I had python 2.5, 3.2,2.7 on laptop, it's also removed the
python-dev and else,
$ cat dpkg.log | grep 2011-12-18 | grep -e python -e autodocktools |
grep -v status | grep -v configure
2011-12-18 02:15:03 remove autodocktools 1.5.6~rc2+cvs.20110926-1 <none>
2011-12-18 02:15:08 purge autodocktools 1.5.6~rc2+cvs.20110926-1 <none>
2011-12-18 02:21:32 install autodocktools <none> 1.5.6~rc2+cvs.20110926-1
2011-12-18 13:14:55 remove autodocktools 1.5.6~rc2+cvs.20110926-1 <none>
2011-12-18 13:15:19 remove idle-python2.6 2.6.7-4 <none>
2011-12-18 13:15:30 purge idle-python2.6 2.6.7-4 <none>
2011-12-18 13:15:40 remove python-all-dev 2.7.2-9 <none>
2011-12-18 13:15:45 remove python2.6-dev 2.6.7-4 <none>
2011-12-18 13:15:48 remove libpython2.6 2.6.7-4 <none>
2011-12-18 13:15:49 purge libpython2.6 2.6.7-4 <none>
2011-12-18 13:15:55 remove python-all 2.7.2-9 <none>
2011-12-18 13:16:02 remove python2.6 2.6.7-4 <none>
2011-12-18 13:16:06 purge python2.6 2.6.7-4 <none>
2011-12-18 13:16:11 remove python2.6-minimal 2.6.7-4 <none>
2011-12-18 13:16:47 purge python2.6-minimal 2.6.7-4 <none>
2011-12-18 13:55:48 install idle-python2.7 <none> 2.7.2-8
2011-12-18 13:56:15 install autodocktools 1.5.6~rc2+cvs.20110926-1
1.5.6~rc2+cvs.20110926-1
2011-12-18 23:16:55 remove python2.5-dev 2.5.5-11 <none>
2011-12-18 23:17:00 remove python2.5 2.5.5-11 <none>
2011-12-18 23:17:06 purge python2.5 2.5.5-11 <none>



> guarantees this for a lot of Python modules in Debian so we can assume
> that this works reliable.
>
> I'd be tempted to close this bug because I can not reproduce it and it
> should be solved on your machine as well.  Or will it come back once
> you reinstall python2.6?

I reinstalled the python2.6 already, feel free to close this bug.
(sorry I gotta a cold so stopped reproducing onc...)
>
> Kind regards

Thanks for your time,

Best regards,
>
>       Andreas.
>
> --
> http://fam-tille.de





More information about the Debian-med-packaging mailing list