2017-08-06, 13:52
I am using the Backup addon to store the backup file to my google drive. But my backup is failing with the below exception:
The backup zip file is also created on the system:
I have already stored the google client id and secret in the addon, so I don't think it's the drive accessibility issue. Also I can see an empty "Kodi Backup" folder is created in my GDrive each time the backup runs. When I checked in google, I found that httplib.BadStatusLine is reported when the http response code returned from the server(GDrive) is not recognized by the application(Backup Add-on)
Did anyone face this problem? How this can be resolved?
Code:
23:05:19.159 T:1740612592 NOTICE: script.xbmcbackup-1.0.9: Writing files to: /Kodi Backup/
23:05:19.162 T:1740612592 NOTICE: script.xbmcbackup-1.0.9: Source: /home/osmc/.kodi/temp/
23:05:19.357 T:1740612592 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'httplib.BadStatusLine'>
Error Contents: ''
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/script.xbmcbackup/scheduler.py", line 156, in <module>
BackupScheduler().start()
File "/home/osmc/.kodi/addons/script.xbmcbackup/scheduler.py", line 57, in start
backup.run(XbmcBackup.Backup,True)
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 278, in run
fileCopied = self.backupFiles(fileManager.getFiles(),self.xbmc_vfs, self.remote_vfs)
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 482, in backupFiles
wroteFile = dest.put(aFile,dest.root_path + aFile[len(source.root_path):])
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 390, in put
parentFolder = self._getGoogleFile(pathList[0])
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 464, in _getGoogleFile
file_list = self.drive.ListFile({'q':"title='" + pathList[1] + "' and 'root' in parents and trashed=false"}).GetList()
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/pydrive/apiattr.py", line 155, in GetList
for x in self:
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/pydrive/apiattr.py", line 139, in next
result = self._GetList()
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/pydrive/auth.py", line 54, in _decorated
return decoratee(self, *args, **kwargs)
File "/home/osmc/.kodi/addons/script.xbmcbackup/resources/lib/pydrive/files.py", line 56, in _GetList
self.metadata = self.auth.service.files().list(**dict(self)).execute()
File "/home/osmc/.kodi/addons/script.module.oauth2client/lib/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/osmc/.kodi/addons/script.module.googleapi/lib/apiclient/http.py", line 722, in execute
body=self.body, headers=self.headers)
File "/home/osmc/.kodi/addons/script.module.oauth2client/lib/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/osmc/.kodi/addons/script.module.oauth2client/lib/oauth2client/client.py", line 556, in new_request
redirections, connection_type)
File "/home/osmc/.kodi/addons/script.module.httplib2/lib/httplib2/__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/home/osmc/.kodi/addons/script.module.httplib2/lib/httplib2/__init__.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/home/osmc/.kodi/addons/script.module.httplib2/lib/httplib2/__init__.py", line 1286, in _conn_request
response = conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1111, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 444, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 408, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
-->End of Python script error report<--
The backup zip file is also created on the system:
Code:
-rw-r--r-- 1 osmc osmc 518940108 Aug 5 23:05 /home/osmc/.kodi/temp/201708052300.zip
osmc@osmc:~/.kodi/temp$ file /home/osmc/.kodi/temp/201708052300.zip
/home/osmc/.kodi/temp/201708052300.zip: Zip archive data, at least v2.0 to extract
I have already stored the google client id and secret in the addon, so I don't think it's the drive accessibility issue. Also I can see an empty "Kodi Backup" folder is created in my GDrive each time the backup runs. When I checked in google, I found that httplib.BadStatusLine is reported when the http response code returned from the server(GDrive) is not recognized by the application(Backup Add-on)
Did anyone face this problem? How this can be resolved?