PyDrive Backend Fails: RelativeURIError

Bug #1540161 reported by JP
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
New
Undecided
Unassigned

Bug Description

Updated duplicity 2016-01-29 in Changelog.GNU, ran my backup script for pydrive and hit this error:

Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.copycombackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Failed: No module named kerberos
Using temporary directory /tmp/duplicity-TdL142-tempdir
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1537, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1531, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1369, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line 1116, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line 1005, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/pydrivebackend.py", line 58, in __init__
    file_list = self.drive.ListFile({'q': "'Root' in parents and trashed=false"}).GetList()
  File "/usr/local/lib/python2.7/dist-packages/pydrive/apiattr.py", line 154, in GetList
    for x in self:
  File "/usr/local/lib/python2.7/dist-packages/pydrive/apiattr.py", line 138, in next
    result = self._GetList()
  File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line 54, in _decorated
    return decoratee(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pydrive/files.py", line 56, in _GetList
    self.metadata = self.auth.service.files().list(**dict(self)).execute()
  File "/usr/local/lib/python2.7/dist-packages/oauth2client/util.py", line 140, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 722, in execute
    body=self.body, headers=self.headers)
  File "/usr/local/lib/python2.7/dist-packages/oauth2client/client.py", line 596, in new_request
    redirections, connection_type)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1440, in request
    (scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 217, in urlnorm
    raise RelativeURIError("Only absolute URIs are allowed. uri = %s" % uri)
RelativeURIError: Only absolute URIs are allowed. uri = https:/drive/v2/files?q=%27Root%27+in+parents+and+trashed%3Dfalse&alt=json&maxResults=1000

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

What was the command line?

Revision history for this message
JP (0j-p) wrote :

duplicity -v9 --volsize=500 --max-blocksize=20480 --name owncloud --progress /var/www/owncloud/ "pydrive://backups/backups/owncloud"

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1540161] Re: PyDrive Backend Fails: RelativeURIError
Download full text (4.8 KiB)

Add a third slash: pydrive:///backups/backups/owncloud

On Mon, Feb 1, 2016 at 7:49 AM, JP <email address hidden> wrote:

> duplicity -v9 --volsize=500 --max-blocksize=20480 --name owncloud
> --progress /var/www/owncloud/ "pydrive://backups/backups/owncloud"
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1540161
>
> Title:
> PyDrive Backend Fails: RelativeURIError
>
> Status in Duplicity:
> New
>
> Bug description:
> Updated duplicity 2016-01-29 in Changelog.GNU, ran my backup script
> for pydrive and hit this error:
>
> Import of duplicity.backends.azurebackend Succeeded
> Import of duplicity.backends.b2backend Succeeded
> Import of duplicity.backends.botobackend Succeeded
> Import of duplicity.backends.cfbackend Succeeded
> Import of duplicity.backends.copycombackend Succeeded
> Import of duplicity.backends.dpbxbackend Succeeded
> Import of duplicity.backends.gdocsbackend Succeeded
> Import of duplicity.backends.giobackend Succeeded
> Import of duplicity.backends.hsibackend Succeeded
> Import of duplicity.backends.hubicbackend Succeeded
> Import of duplicity.backends.imapbackend Succeeded
> Import of duplicity.backends.lftpbackend Succeeded
> Import of duplicity.backends.localbackend Succeeded
> Import of duplicity.backends.megabackend Succeeded
> Import of duplicity.backends.multibackend Succeeded
> Import of duplicity.backends.ncftpbackend Succeeded
> Import of duplicity.backends.onedrivebackend Succeeded
> Import of duplicity.backends.par2backend Succeeded
> Import of duplicity.backends.pydrivebackend Succeeded
> Import of duplicity.backends.rsyncbackend Succeeded
> Import of duplicity.backends.ssh_paramiko_backend Succeeded
> Import of duplicity.backends.ssh_pexpect_backend Succeeded
> Import of duplicity.backends.swiftbackend Succeeded
> Import of duplicity.backends.sxbackend Succeeded
> Import of duplicity.backends.tahoebackend Succeeded
> Import of duplicity.backends.webdavbackend Failed: No module named
> kerberos
> Using temporary directory /tmp/duplicity-TdL142-tempdir
> Traceback (most recent call last):
> File "/usr/local/bin/duplicity", line 1537, in <module>
> with_tempdir(main)
> File "/usr/local/bin/duplicity", line 1531, in with_tempdir
> fn()
> File "/usr/local/bin/duplicity", line 1369, in main
> action = commandline.ProcessCommandLine(sys.argv[1:])
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line
> 1116, in ProcessCommandLine
> backup, local_pathname = set_backend(args[0], args[1])
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line
> 1005, in set_backend
> globals.backend = backend.get_backend(bend)
> File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py",
> line 223, in get_backend
> obj = get_backend_object(url_string)
> File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py",
> line 209, in get_backend_object
> return factory(pu)
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/backends/pydrivebackend.py",
>...

Read more...

Revision history for this message
JP (0j-p) wrote :

Ok, third slash removed that error but moved me to:
InvalidBackendURL: Missing hostname in a backend URL which requires an explicit hostname

Syntax has changed a bit?

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :
Download full text (5.0 KiB)

Nothing has changed in pydrive.py since September, so I'm curious what else
may have changed.

The error message shows *https:/drive/v2...* which is missing the second
slash after https:/, so maybe a library update somewhere?

What OS? What version of Python?

On Tue, Feb 2, 2016 at 1:06 PM, JP <email address hidden> wrote:

> Ok, third slash removed that error but moved me to:
> InvalidBackendURL: Missing hostname in a backend URL which requires an
> explicit hostname
>
> Syntax has changed a bit?
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1540161
>
> Title:
> PyDrive Backend Fails: RelativeURIError
>
> Status in Duplicity:
> New
>
> Bug description:
> Updated duplicity 2016-01-29 in Changelog.GNU, ran my backup script
> for pydrive and hit this error:
>
> Import of duplicity.backends.azurebackend Succeeded
> Import of duplicity.backends.b2backend Succeeded
> Import of duplicity.backends.botobackend Succeeded
> Import of duplicity.backends.cfbackend Succeeded
> Import of duplicity.backends.copycombackend Succeeded
> Import of duplicity.backends.dpbxbackend Succeeded
> Import of duplicity.backends.gdocsbackend Succeeded
> Import of duplicity.backends.giobackend Succeeded
> Import of duplicity.backends.hsibackend Succeeded
> Import of duplicity.backends.hubicbackend Succeeded
> Import of duplicity.backends.imapbackend Succeeded
> Import of duplicity.backends.lftpbackend Succeeded
> Import of duplicity.backends.localbackend Succeeded
> Import of duplicity.backends.megabackend Succeeded
> Import of duplicity.backends.multibackend Succeeded
> Import of duplicity.backends.ncftpbackend Succeeded
> Import of duplicity.backends.onedrivebackend Succeeded
> Import of duplicity.backends.par2backend Succeeded
> Import of duplicity.backends.pydrivebackend Succeeded
> Import of duplicity.backends.rsyncbackend Succeeded
> Import of duplicity.backends.ssh_paramiko_backend Succeeded
> Import of duplicity.backends.ssh_pexpect_backend Succeeded
> Import of duplicity.backends.swiftbackend Succeeded
> Import of duplicity.backends.sxbackend Succeeded
> Import of duplicity.backends.tahoebackend Succeeded
> Import of duplicity.backends.webdavbackend Failed: No module named
> kerberos
> Using temporary directory /tmp/duplicity-TdL142-tempdir
> Traceback (most recent call last):
> File "/usr/local/bin/duplicity", line 1537, in <module>
> with_tempdir(main)
> File "/usr/local/bin/duplicity", line 1531, in with_tempdir
> fn()
> File "/usr/local/bin/duplicity", line 1369, in main
> action = commandline.ProcessCommandLine(sys.argv[1:])
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line
> 1116, in ProcessCommandLine
> backup, local_pathname = set_backend(args[0], args[1])
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line
> 1005, in set_backend
> globals.backend = backend.get_backend(bend)
> File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py",
> line 223, in get_backend
> obj = get_backend_obje...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.