Problems with Iptc_Exif_reading_support product
Hello I'm using the Iptc_Exif_reading_support product which is available at http://zope.org/Members/ausum/Iptc_Exif_reading_support It show that after restarting Zope one upload of a random image is necessary to let this product worc correctly. If I do not do this I get the error message: Error type: NameError Error value: global name 'verbosedisplays' is not defined Any hint how that can be fixed? BTW, there is no license applied to this product. This makes a software non-free from a Debian point of view and thus I can not package this Product for Debian. Half a year ago I wrote an e-mail to <ausum_studio@hotmail.com> which is listed as "Contact Email" for this product to clarify this issue but I've got no response. Anybody knows more about the author? Kind regards Andreas.
Andreas Tille wrote at 2004-1-19 17:50 +0100:
I'm using the Iptc_Exif_reading_support product which is available at
http://zope.org/Members/ausum/Iptc_Exif_reading_support
It show that after restarting Zope one upload of a random image is necessary to let this product worc correctly. If I do not do this I get the error message:
Error type: NameError Error value: global name 'verbosedisplays' is not defined
Any hint how that can be fixed?
First, we need to understand why it happens: I expect that the module variable "verbosedisplays" is set during the first upload (maybe via assignment to a variable declared "global"). Search the sources for "verbosedisplays", to find out. Should I be right, then you can add a missing preset for "verbosedisplays". -- Dieter
On Tue, 20 Jan 2004, Dieter Maurer wrote:
First, we need to understand why it happens:
I expect that the module variable "verbosedisplays" is set during the first upload (maybe via assignment to a variable declared "global").
Search the sources for "verbosedisplays", to find out.
Should I be right, then you can add a missing preset for "verbosedisplays". This is about the knowledge I gathered before: You are right and the only occurence of this variable is
/usr/lib/zope/lib/python/Products/PhotoIptcExif/__init__.py and there it is declared as global. Unfortunately my knowledge is to limited to understand this code, for example what this stuff means: try: verbosedisplays = None except: pass So the reason for the problem is clear but I'm afraid I'm unable to fix it. (I guess the thread "Global Variables" is connected to this problem - because it is started by the author of the product. ;-) ) Kind regards Andreas.
Andreas Tille wrote:
try: verbosedisplays = None except: pass
Is that is? Yuk... bar try-except's such :-S try replacing it with: try: verbosedisplays = None except: raise ...and see if you get any errors... cheers, Chris
Andreas Tille wrote at 2004-1-20 22:54 +0100:
... This is about the knowledge I gathered before: You are right and the only occurence of this variable is
/usr/lib/zope/lib/python/Products/PhotoIptcExif/__init__.py
and there it is declared as global. Unfortunately my knowledge is to limited to understand this code, for example what this stuff means:
try: verbosedisplays = None except: pass
Looks like a convoluted synonym for verbosedisplays = None i.e. the "try/except" has no effect.
So the reason for the problem is clear but I'm afraid I'm unable to fix it.
Put the line verbosedisplays = None near the start of the module and see what happens. You should no longer see your former exception (of course, you may see a different one).
(I guess the thread "Global Variables" is connected to this problem - because it is started by the author of the product. ;-) )
I did not understand this thread and stopped to read it very quickly... -- Dieter
participants (3)
-
Andreas Tille -
Chris Withers -
Dieter Maurer