Thread: [Rest2web-develop] Gallery Test crashes when rerun
Brought to you by:
mjfoord
From: Marc C. <ma...@ro...> - 2006-03-19 20:57:50
|
Hi, Out of the box gallery_test works ok, but when I rerun it, it generates the thumbnails for the first directory, then complains about not being about not being able to cast an int into a long. Is there a special clean up necessary for rerunning gallery_test. Thanks, Marc Processing "root" directory. [err] Traceback (most recent call last): [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? [err] count = main(config) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main [err] return processor.walk() [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk [err] self.setdefaults(dir_list) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults [err] restindex, uservalues)) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page [err] data = get_info(params) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 117, in get_info [err] im = Image.open(path) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, in open [err] return factory(fp, filename) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line 82, in __init__ [err] self._open() [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", line 63, in _open [err] self.ole = OleFileIO(self.fp) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 260, in __init__ [err] self.open(filename) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 293, in open [err] self.loaddirectory(i32(header, 48)) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 339, in loaddirectory [err] fp = self._open(sect) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 405, in _open [err] self.sectorsize, self.fat) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 106, in __init__ [err] sect = fat[sect] [err] OverflowError: long int too large to convert to int [err] |
From: Michael F. <fuz...@vo...> - 2006-03-19 23:00:17
|
Marc Condon wrote: > Hi, > > Out of the box gallery_test works ok, but when I rerun it, it > generates the thumbnails for the first directory, then complains about > not being about not being able to cast an int into a long. > Is there a special clean up necessary for rerunning gallery_test. > That's a bizarre error. The actual error occurs in a straightforward call to ``Image.open``: im = Image.open(path) I wonder what the path is when that fails. Can you add a line just above line 117 to ``print path``, please. In the meantime I'll see if I can reproduce the bug. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks, > Marc > > Processing "root" directory. > [err] Traceback (most recent call last): > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, > in ? > [err] count = main(config) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, > in main > [err] return processor.walk() > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > line 187, in walk > [err] self.setdefaults(dir_list) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > line 459, in setdefaults > [err] restindex, uservalues)) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > line 1312, in do_plugin > [err] return self.plugins[plugin].page(filename, target, > restindex, uservalues) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", > line 76, in page > [err] data = get_info(params) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", > line 117, in get_info > [err] im = Image.open(path) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, > in open > [err] return factory(fp, filename) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line > 82, in __init__ > [err] self._open() > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", > line 63, in _open > [err] self.ole = OleFileIO(self.fp) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > 260, in __init__ > [err] self.open(filename) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > 293, in open > [err] self.loaddirectory(i32(header, 48)) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > 339, in loaddirectory > [err] fp = self._open(sect) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > 405, in _open > [err] self.sectorsize, self.fat) > [err] File "C:\Documents and Settings\All > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > 106, in __init__ > [err] sect = fat[sect] > [err] OverflowError: long int too large to convert to int > [err] > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > |
From: Marc <Ma...@ro...> - 2006-03-20 21:07:38
|
On Sun, 19 Mar 2006 23:00:31 +0000 Michael Foord <fuz...@vo...> wrote: > print path Hi, Thanks for getting back with me. I added 'print path' to above line 117 of rest2web.py def main_is_frozen(): return ( # new py2exe hasattr(sys, "frozen") or # tools/freeze print path imp.is_frozen("__main__")) path is not defined in this point of the code and I get a systax error. Where do I add the echo? Marc |
From: Michael F. <fuz...@vo...> - 2006-03-21 11:03:55
|
Marc wrote: > On Sun, 19 Mar 2006 23:00:31 +0000 Michael Foord <fuz...@vo...> wrote: > > >> print path >> > > Hi, > > Thanks for getting back with me. > > I added 'print path' to above line 117 of rest2web.py > > def main_is_frozen(): > return ( > # new py2exe > hasattr(sys, "frozen") or > # tools/freeze > print path > imp.is_frozen("__main__")) > > path is not defined in this point of the code and I get a systax error. > > Where do I add the echo? > > The crash occurs in the following file : "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py" It is in *this* file that you should add the print statement. This should then show us (in the log) what path is causing the error. :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Marc > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > |
From: Marc <Ma...@ro...> - 2006-03-21 16:23:03
|
Hi Fuzzyman, Thanks for clearing up syntax misunderstanding. Below is my log file. Please advise, Marc On Sun, 19 Mar 2006 23:00:31 +0000 Michael Foord <fuz...@vo...> wrote: > Marc Condon wrote: > > Hi, > > > > Out of the box gallery_test works ok, but when I rerun it, it > > generates the thumbnails for the first directory, then complains about > > not being about not being able to cast an int into a long. > > Is there a special clean up necessary for rerunning gallery_test. > > > That's a bizarre error. The actual error occurs in a straightforward > call to ``Image.open``: > > im = Image.open(path) > > I wonder what the path is when that fails. Can you add a line just above > line 117 to ``print path``, please. > > In the meantime I'll see if I can reproduce the bug. > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml > > Thanks, > > Marc > > > > Processing "root" directory. > > [err] Traceback (most recent call last): > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, > > in ? > > [err] count = main(config) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, > > in main > > [err] return processor.walk() > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > > line 187, in walk > > [err] self.setdefaults(dir_list) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > > line 459, in setdefaults > > [err] restindex, uservalues)) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", > > line 1312, in do_plugin > > [err] return self.plugins[plugin].page(filename, target, > > restindex, uservalues) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", > > line 76, in page > > [err] data = get_info(params) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", > > line 117, in get_info > > [err] im = Image.open(path) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, > > in open > > [err] return factory(fp, filename) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line > > 82, in __init__ > > [err] self._open() > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", > > line 63, in _open > > [err] self.ole = OleFileIO(self.fp) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > > 260, in __init__ > > [err] self.open(filename) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > > 293, in open > > [err] self.loaddirectory(i32(header, 48)) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > > 339, in loaddirectory > > [err] fp = self._open(sect) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > > 405, in _open > > [err] self.sectorsize, self.fat) > > [err] File "C:\Documents and Settings\All > > Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line > > 106, in __init__ > > [err] sect = fat[sect] > > [err] OverflowError: long int too large to convert to int > > [err] > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Rest2web-develop mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > Cannot find Psyco, skipping it rest2web version 0.4.0 alpha Running rest2web the Site Builder. Tue Mar 21 08:19:52 2006 Starting in "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\gallery_test" directory. Processing "root" directory. ../sites/rest2web/gallery_test/gallery\apollo08_earthrise.jpg ../sites/rest2web/gallery_test/gallery\apollo16_earth_northamerica.jpg ../sites/rest2web/gallery_test/gallery\apollo17_schmitt_boulder.jpg ../sites/rest2web/gallery_test/gallery\apollo_lem.jpg ../sites/rest2web/gallery_test/gallery\apollo_rover.jpg ../sites/rest2web/gallery_test/gallery\face.jpg ../sites/rest2web/gallery_test/gallery\gal_africa.jpg ../sites/rest2web/gallery_test/gallery\hst_bubble.jpg ../sites/rest2web/gallery_test/gallery\hst_carina.jpg ../sites/rest2web/gallery_test/gallery\hst_crab_nebula.jpg Reading "subfolder\index.txt". Guessing encoding. We guessed: ISO8859-1 Reading "template.txt". Processing indexfile. Guessing encoding. We guessed: ISO8859-1 Building index.html Skipping "index.html". Identical file exists. Processing "subfolder" directory. subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\cart_and_girl.jpg subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\eddie.jpg subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fried_brains.jpg subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fuzzyman.jpg subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\horse_and_cart.jpg subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\Thumbs.db [err] Traceback (most recent call last): [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? [err] count = main(config) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main [err] return processor.walk() [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk [err] self.setdefaults(dir_list) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults [err] restindex, uservalues)) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page [err] data = get_info(params) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 118, in get_info [err] im = Image.open(path) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, in open [err] return factory(fp, filename) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line 82, in __init__ [err] self._open() [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", line 63, in _open [err] self.ole = OleFileIO(self.fp) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 260, in __init__ [err] self.open(filename) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 293, in open [err] self.loaddirectory(i32(header, 48)) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 339, in loaddirectory [err] fp = self._open(sect) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 405, in _open [err] self.sectorsize, self.fat) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 106, in __init__ [err] sect = fat[sect] [err] OverflowError: long int too large to convert to int [err] |
From: Michael F. <fuz...@vo...> - 2006-03-21 16:28:15
|
Hello Marc, I think we've got it. Marc wrote: > Processing "subfolder" directory. > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\cart_and_girl.jpg > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\eddie.jpg > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fried_brains.jpg > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fuzzyman.jpg > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\horse_and_cart.jpg > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\Thumbs.db > Gallery is attempting to process 'thumbs.db' and failing. This is autocreated by windows when you view the directory. I'll have to fix the gallery to skip this file (I *thought* it already did - obviously not). In the meantime you need to delete this file first. You might need to change your folder settings to 'View -> List' and show hidden files to be able to delete it. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > [err] Traceback (most recent call last): > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? > [err] count = main(config) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main > [err] return processor.walk() > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk > [err] self.setdefaults(dir_list) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults > [err] restindex, uservalues)) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin > [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page > [err] data = get_info(params) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 118, in get_info > [err] im = Image.open(path) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, in open > [err] return factory(fp, filename) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line 82, in __init__ > [err] self._open() > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", line 63, in _open > [err] self.ole = OleFileIO(self.fp) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 260, in __init__ > [err] self.open(filename) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 293, in open > [err] self.loaddirectory(i32(header, 48)) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 339, in loaddirectory > [err] fp = self._open(sect) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 405, in _open > [err] self.sectorsize, self.fat) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 106, in __init__ > [err] sect = fat[sect] > [err] OverflowError: long int too large to convert to int > [err] > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > |
From: Marc <Ma...@ro...> - 2006-03-22 00:03:04
|
On Tue, 21 Mar 2006 16:28:16 +0000 Michael Foord <fuz...@vo...> wrote: > Hello Marc, > > I think we've got it. > > Marc wrote: > > Processing "subfolder" directory. > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\cart_and_girl.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\eddie.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fried_brains.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fuzzyman.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\horse_and_cart.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\Thumbs.db > > > Gallery is attempting to process 'thumbs.db' and failing. This is > autocreated by windows when you view the directory. > > I'll have to fix the gallery to skip this file (I thought it already > did - obviously not). In the meantime you need to delete this file first. > > You might need to change your folder settings to 'View -> List' and show > hidden files to be able to delete it. > > All the best, > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml > > > [err] Traceback (most recent call last): > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? > > [err] count = main(config) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main > > [err] return processor.walk() > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk > > [err] self.setdefaults(dir_list) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults > > [err] restindex, uservalues)) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin > > [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page > > [err] data = get_info(params) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 118, in get_info > > [err] im = Image.open(path) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, in open > > [err] return factory(fp, filename) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line 82, in __init__ > > [err] self._open() > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", line 63, in _open > > [err] self.ole = OleFileIO(self.fp) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 260, in __init__ > > [err] self.open(filename) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 293, in open > > [err] self.loaddirectory(i32(header, 48)) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 339, in loaddirectory > > [err] fp = self._open(sect) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 405, in _open > > [err] self.sectorsize, self.fat) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 106, in __init__ > > [err] sect = fat[sect] > > [err] OverflowError: long int too large to convert to int > > [err] > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > > that extends applications into web and mobile media. Attend the live webcast > > and join the prime developer group breaking into this new coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Rest2web-develop mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > > > Hi Fuzzyman, Thats was it. Looks like I was right about reinitialization. Thumbs.db being hidden is really weird on Windows. It cannot be seen nor found in File Explorer. In a shell, plain 'ls' discovers it. I like using these tools thanks for publishing them. Thanks, Marc |
From: Marc <Ma...@ro...> - 2006-03-22 18:34:15
Attachments:
CatsAndDoves.jpg
|
On Tue, 21 Mar 2006 16:28:16 +0000 Michael Foord <fuz...@vo...> wrote: > Hello Marc, > > I think we've got it. > > Marc wrote: > > Processing "subfolder" directory. > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\cart_and_girl.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\eddie.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fried_brains.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\fuzzyman.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\horse_and_cart.jpg > > subfolder\../../sites/rest2web/gallery_test/subfolder/gallery2\Thumbs.db > > > Gallery is attempting to process 'thumbs.db' and failing. This is > autocreated by windows when you view the directory. > > I'll have to fix the gallery to skip this file (I thought it already > did - obviously not). In the meantime you need to delete this file first. > > You might need to change your folder settings to 'View -> List' and show > hidden files to be able to delete it. > > All the best, > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml > > > [err] Traceback (most recent call last): > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? > > [err] count = main(config) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main > > [err] return processor.walk() > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk > > [err] self.setdefaults(dir_list) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults > > [err] restindex, uservalues)) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin > > [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page > > [err] data = get_info(params) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 118, in get_info > > [err] im = Image.open(path) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1741, in open > > [err] return factory(fp, filename) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\ImageFile.py", line 82, in __init__ > > [err] self._open() > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\FpxImagePlugin.py", line 63, in _open > > [err] self.ole = OleFileIO(self.fp) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 260, in __init__ > > [err] self.open(filename) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 293, in open > > [err] self.loaddirectory(i32(header, 48)) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 339, in loaddirectory > > [err] fp = self._open(sect) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 405, in _open > > [err] self.sectorsize, self.fat) > > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\OleFileIO.py", line 106, in __init__ > > [err] sect = fat[sect] > > [err] OverflowError: long int too large to convert to int > > [err] > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > > that extends applications into web and mobile media. Attend the live webcast > > and join the prime developer group breaking into this new coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Rest2web-develop mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > > > Hi Fuzzyman, This is just FYI. Enclosed is a sample jpg that causes this error. I understand why it's not supported, just thought you might want to skip these. Just FYI, Marc Animals\../../sites/marcs1stsite/Personal/Galleries/Animals/Cats\CatsAndDoves.jpg [err] Traceback (most recent call last): [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? [err] count = main(config) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main [err] return processor.walk() [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk [err] self.setdefaults(dir_list) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults [err] restindex, uservalues)) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page [err] data = get_info(params) [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 143, in get_info [err] im.save(thumb_name) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1305, in save [err] save_handler(self, fp, filename) [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\JpegImagePlugin.py", line 390, in _save [err] raise IOError("cannot write mode %s as JPEG" % im.mode) [err] IOError: cannot write mode P as JPEG [err] |
From: Michael F. <fuz...@vo...> - 2006-03-22 19:35:17
|
Marc wrote: > Hi Fuzzyman, > > This is just FYI. Enclosed is a sample jpg that causes this error. I understand why it's not supported, just thought you might want to skip these. > > Just FYI, > Marc > > > Ok. It's a limitation in the Python Imaging Library which I use to handle the images (although I can understand why it struggles to create a thumbnail of an animated jpg.) The only way to avoid this (as far as I can tell) is to trap the error and skip the file - probably with a warning. Until I implement a reduced verbosity mode - the warning might be difficult to spot though. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Animals\../../sites/marcs1stsite/Personal/Galleries/Animals/Cats\CatsAndDoves.jpg > [err] Traceback (most recent call last): > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 168, in ? > [err] count = main(config) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web.py", line 104, in main > [err] return processor.walk() > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 187, in walk > [err] self.setdefaults(dir_list) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 459, in setdefaults > [err] restindex, uservalues)) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\restprocessor.py", line 1312, in do_plugin > [err] return self.plugins[plugin].page(filename, target, restindex, uservalues) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 76, in page > [err] data = get_info(params) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\rest2web-0.4.0alpha\rest2web\plugins\gallery.py", line 143, in get_info > [err] im.save(thumb_name) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\Image.py", line 1305, in save > [err] save_handler(self, fp, filename) > [err] File "C:\Documents and Settings\All Users\Documents\Python242\Lib\site-packages\PIL\JpegImagePlugin.py", line 390, in _save > [err] raise IOError("cannot write mode %s as JPEG" % im.mode) > [err] IOError: cannot write mode P as JPEG > [err] > > ------------------------------------------------------------------------ > > |