You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/management/commands/reprocess_photos.py", line 33, in handle
self.reprocess_model(model, image_fields, kwargs['force'])
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/management/commands/reprocess_photos.py", line 42, in reprocess_model
val.reprocess(save=False, force_reprocess=force)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 255, in reprocess
self.reprocess_info(save=False)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 224, in reprocess_info
source_image = self.image()
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 155, in image
self.file.open()
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/db/models/fields/files.py", line 52, in _get_file
self._file = self.storage.open(self.name, 'rb')
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/files/storage.py", line 33, in open
file = self._open(name, mode)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/files/storage.py", line 159, in _open
return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/public/media/products/2010/09/23/lxthron_2.jpg'
While we should never have missing files in normal circumstances, it would be nice to catch that exception and keep running the reprocess_photos command
This is accomplished pretty easily by editing management/commands/reprocess_photos.py:
and changing:
val.reprocess(save=False, force_reprocess=force)
to:
try:
val.reprocess(save=False, force_reprocess=force)
except IOError:
print "File not found: %s. Could not reprocess image for model: %s"%(val.url, model)
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/management/commands/reprocess_photos.py", line 33, in handle
self.reprocess_model(model, image_fields, kwargs['force'])
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/management/commands/reprocess_photos.py", line 42, in reprocess_model
val.reprocess(save=False, force_reprocess=force)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 255, in reprocess
self.reprocess_info(save=False)
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 224, in reprocess_info
source_image = self.image()
File "/Users/kam/dev/virtualenvs/littlegiraffe42/lib/python2.7/site-packages/photoprocessor/fields.py", line 155, in image
self.file.open()
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/db/models/fields/files.py", line 52, in _get_file
self._file = self.storage.open(self.name, 'rb')
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/files/storage.py", line 33, in open
file = self._open(name, mode)
File "/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/django/core/files/storage.py", line 159, in _open
return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/Users/kam/dev/projects/webcube-littlegiraffe42/littlegiraffe/public/media/products/2010/09/23/lxthron_2.jpg'
While we should never have missing files in normal circumstances, it would be nice to catch that exception and keep running the reprocess_photos command
This is accomplished pretty easily by editing management/commands/reprocess_photos.py:
and changing:
val.reprocess(save=False, force_reprocess=force)
to:
try:
val.reprocess(save=False, force_reprocess=force)
except IOError:
print "File not found: %s. Could not reprocess image for model: %s"%(val.url, model)
The text was updated successfully, but these errors were encountered: