enen92 / screensaver.atv4

Apple aerial screensavers (apple tv 4) for Kodi
GNU General Public License v2.0
52 stars 10 forks source link

Error when downloading videos #17

Closed tremby closed 7 years ago

tremby commented 7 years ago

Version 1.3.3.

When I hit "downloading videos" today, one downloaded, and then an error came up on the screen telling me to check the log file for more details. I clicked "download" again and this time there was just the wait "checking which videos to download" and then the error again.

In the log file I have this:

14:59:15 483476.250000 T:1956189104 WARNING: RunScript called for a non-script addon 'screensaver.atv4'. This behaviour is deprecated.
15:01:43 483624.187500 T:1449907184   ERROR: EXCEPTION: Unknown exception thrown from the call "read"
15:01:43 483624.343750 T:1449907184   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: Unknown exception thrown from the call "read"
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/atv.py", line 132, in <module>
                                                off.offline()
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/resources/lib/offline.py", line 49, in offline
                                                down.downloadall(downloadList)
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/resources/lib/downloader.py", line 53, in downloadall
                                                file_checksum = hashlib.md5(f.read()).hexdigest()
                                            RuntimeError: Unknown exception thrown from the call "read"
                                            -->End of Python script error report<--
15:01:51 483632.062500 T:1956189104 WARNING: RunScript called for a non-script addon 'screensaver.atv4'. This behaviour is deprecated.
15:03:11 483711.812500 T:1556083696   ERROR: EXCEPTION: Unknown exception thrown from the call "read"
15:03:11 483711.843750 T:1556083696   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: Unknown exception thrown from the call "read"
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/atv.py", line 132, in <module>
                                                off.offline()
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/resources/lib/offline.py", line 49, in offline
                                                down.downloadall(downloadList)
                                              File "/home/osmc/.kodi/addons/screensaver.atv4/resources/lib/downloader.py", line 53, in downloadall
                                                file_checksum = hashlib.md5(f.read()).hexdigest()
                                            RuntimeError: Unknown exception thrown from the call "read"
                                            -->End of Python script error report<--
enen92 commented 7 years ago

This is something I can't solve since it's an exception thrown by kodi itself. Not sure if you are downloading videos to a network share but if that's the case, the checksum calculation can be really long. I'll provide a setting to ignore checksums so those exceptions are not thrown and you don't have to wait an eternity if something goes wrong during the download process and have to repeat.

enen92 commented 7 years ago

I added a setting to disable checksum checking (it is enabled by default though). Please re-check this one as well.

tremby commented 7 years ago

I am saving to a network share, yes.

I downloaded the new version and unchecked the "disable checksum checking" option (and unchecking this sounds like it should enable checksum checking? Maybe the setting should be "enable" instead of "disable", to be clearer), and I had no error this time.