Skip to content

On mac if jpg take times for be wrinting into the folder an exception append #1

@rage2000

Description

@rage2000

On mac if jpg take times for be wrinting into the folder this exception

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/usr/local/lib/python3.7/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/usr/local/lib/python3.7/site-packages/watchdog/events.py", line 330, in dispatch
    _method_map[event_type](event)
  File "/usr/local/lib/python3.7/site-packages/pylaroid/file_handler.py", line 23, in on_created
    self.photo_sheet.add_photo(event.src_path)
  File "/usr/local/lib/python3.7/site-packages/pylaroid/models.py", line 31, in add_photo
    self.generate_polaroid(file_path)
  File "/usr/local/lib/python3.7/site-packages/pylaroid/models.py", line 48, in generate_polaroid
    image = SelfDevPhoto(file_path, logo=self.logo)
  File "/usr/local/lib/python3.7/site-packages/pylaroid/polaroid.py", line 20, in __init__
    img = Image(filename=filepath)
  File "/usr/local/lib/python3.7/site-packages/wand/image.py", line 2744, in __init__
    self.read(filename=filename, resolution=resolution)
  File "/usr/local/lib/python3.7/site-packages/wand/image.py", line 2822, in read
    self.raise_exception()
  File "/usr/local/lib/python3.7/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.CorruptImageError: insufficient image data in file `./DSC_1705_.JPG' @ error/jpeg.c/ReadJPEGImage/1106```

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions