Nebelhom / SlideShow4RaspberryPi

A very simple script to run through a set of images to show on screen for a digital photoframe used on a raspberry pi
Mozilla Public License 2.0
0 stars 0 forks source link

AttributeError: 'NoneType' object has no attribute 'items' #33

Closed Nebelhom closed 3 years ago

Nebelhom commented 3 years ago
Traceback (most recent call last):
   File "/home/nebelhom/SlideShow4RaspberryPi/main.py", line 392, in <module>
     SlideShowApp().run()
   File "/home/nebelhom/anaconda3/envs/Slideshow/lib/python3.9/site-packages/kivy/app.py", line 949, in run
     self._run_prepare()
   File "/home/nebelhom/anaconda3/envs/Slideshow/lib/python3.9/site-packages/kivy/app.py", line 919, in _run_prepare
     root = self.build()
   File "/home/nebelhom/SlideShow4RaspberryPi/main.py", line 384, in build
     root = RootWidget()
   File "/home/nebelhom/SlideShow4RaspberryPi/main.py", line 62, in __init__
     self.picture = Picture(img_dir=IMG_DIR,
   File "/home/nebelhom/SlideShow4RaspberryPi/main.py", line 126, in __init__
     self.set_angle()
   File "/home/nebelhom/SlideShow4RaspberryPi/main.py", line 175, in set_angle
     o = hf.get_img_orientation(self.source)
   File "/home/nebelhom/SlideShow4RaspberryPi/helper_func.py", line 140, in get_img_orientation
     for k, v in img._getexif().items()
 AttributeError: 'NoneType' object has no attribute 'items'

Most likely to do with missing exif data --> give a standard solution for missing exif