1

Long story short i got a developer to make me a wizard and even though I have paid him he has not left without reply and stuck with a half working python wizard.

The wizard works inside Kodi and downloads a zip file and extracts it. But sometimes I am getting a script error.

The error looks like this:

    ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                         - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                        Error Type: <class 'urllib.ContentTooShortError'>
                                        Error Contents: retrieval incomplete: got only 138374907 out of 763947095 bytes
                                        Traceback (most recent call last):
                                          File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.ymwizard/default.py", line 161, in <module>
                                            wizard(name,url,description)
                                          File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.ymwizard/default.py", line 49, in wizard
                                            downloader.download(url, lib, dp)
                                          File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.ymwizard/downloader.py", line 9, in download
                                            urllib.urlretrieve(url,dest,lambda nb, bs, fs, url=url: _pbhook(nb,bs,fs,url,dp))
                                          File "/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-android-14/lib/python2.6/urllib.py", line 93, in urlretrieve
                                          File "/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-android-14/lib/python2.6/urllib.py", line 283, in retrieve
                                        ContentTooShortError: retrieval incomplete: got only 138374907 out of 763947095 bytes
                                        -->End of Python script error report<--
user3566506
  • 69
  • 1
  • 8
  • Looks like the file could not be fully downloaded. Check the internet connection and the server! The proper way to handle this is to catch the exception and show a user error message. – Klaus D. Jul 27 '15 at 07:57
  • thanks for that, will try another server shortly when i get home and let u know. thank you – user3566506 Jul 27 '15 at 08:16

1 Answers1

2

Its the urllib error the file is not fully downloaded your requests should be in try: except: blocks

Jaysheel Utekar
  • 1,171
  • 1
  • 19
  • 37