1

长话短说,我请了一位开发人员让我成为一名巫师,尽管我已经付钱给他,但他并没有不理睬他,而是坚持使用一个半工作的 Python 巫师。

该向导在 Kodi 中运行并下载一个 zip 文件并将其解压缩。但有时我会收到脚本错误。

错误如下所示:

    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<--
4

1 回答 1

2

它的 urllib 错误文件未完全下载您的请求应该在 try: except: blocks

于 2015-09-11T07:56:03.010 回答