Menu

#1 new_list_photo doesn't exist of source permissions bad

open
nobody
None
5
2004-09-04
2004-09-04
No

If file permissions to images do not allow reading and Image Magic is
being used, during import this confusing exception is raised:

Module ZPublisher.Publish, line 101, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.ZPhotoSlides.ZPhotoSlides, line 258, in
manage_addZPhotoSlides
Module Products.ZPhotoSlides.ZPhotoSlides, line 1343, in
ask_4_thumbnails
AttributeError: new_list_photo

Digging deeper the exception actually comes from here:

Traceback (most recent call last):
File "/usr/local/www/zope/default/Products/ZPhotoSlides/ZPhotoSlides.py", line 1339, in ask_4_thumbnails
self.new_list_photo,amount = thumbnails_manage_IM(start_path,self.convert,self.tmp_dir,recursive,double_name,width,height,prefix,{})
File "/usr/local/www/zope/default/Products/ZPhotoSlides/photo_edition/IMG_IM_start.py"
, line 145, in thumbnails_manage_IM
dict,amount = recursive_thumbnails_IM(path,path,destination,width,height,prefix,dict
,double_name,0,convert)
File "/usr/local/www/zope/default/Products/ZPhotoSlides/photo_edition/IMG_IM_start.py"
, line 130, in recursive_thumbnails_IM
dict,amount = thumbnails_IM(path,init_path,destination,width,height,prefix,dict,double_name,convert)
File "/usr/local/www/zope/default/Products/ZPhotoSlides/photo_edition/IMG_IM_start.py"
, line 87, in thumbnails_IM
dict[Im.imgname] = Im.imgname + ': ' + errormsg + '<br>'
NameError: global name 'Im' is not defined

Curiously the definition of Im is commented out in thie above file; the value is
required in the exception block that gets triggered if the file could not be read.

I think the fix is to uncomment where Im is assigned; but someone must have commented it out for a reason? Maybe there are other side effects of it...

Discussion


Log in to post a comment.