KeyError: '_module' with gdocs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

KeyError: '_module' with gdocs

duplicity-talk mailing list
After installing Fedora 26 0x86 64-bit, am unable to get duplicity to
connect with gdocs (worked fine on Fedora 24).

Python 2.7.13
duplicity 0.7.13.1
pydrive 1.3.1

Have redone the google developer authorization procedure, but keep
getting the following traceback:

   File "/usr/bin/duplicity", line 1540, in <module>
     with_tempdir(main)
   File "/usr/bin/duplicity", line 1534, in with_tempdir
     fn()
   File "/usr/bin/duplicity", line 1372, in main
     action = commandline.ProcessCommandLine(sys.argv[1:])
   File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py",
line 1140, in ProcessCommandLine
     backup, local_pathname = set_backend(args[0], args[1])
   File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py",
line 1015, in set_backend
     globals.backend = backend.get_backend(bend)
   File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line
223, in get_backend
     obj = get_backend_object(url_string)
   File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line
209, in get_backend_object
     return factory(pu)
   File
"/usr/lib64/python2.7/site-packages/duplicity/backends/pydrivebackend.py",
line 69, in __init__
     gauth.CommandLineAuth()
   File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 111, in
_decorated
     self.LoadCredentials()
   File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 289, in
LoadCredentials
     self.LoadCredentialsFile()
   File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 308, in
LoadCredentialsFile
     self.credentials = storage.get()
   File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line
407, in get
     return self.locked_get()
   File "/usr/lib/python2.7/site-packages/oauth2client/file.py", line
54, in locked_get
     credentials = client.Credentials.new_from_json(content)
   File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line
302, in new_from_json
     module_name = data['_module']
KeyError: '_module'

The credentials file is the json file that I downloaded from the Google
site.

?? .... thanks.

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: KeyError: '_module' with gdocs

duplicity-talk mailing list
It looks like you do not have GOOGLE_CREDENTIALS_FILE set.  Set it to the location of the filename you got from Google and it should work.

...Ken


On Wed, Sep 13, 2017 at 10:47 AM, Norman Goldstein via Duplicity-talk <[hidden email]> wrote:
After installing Fedora 26 0x86 64-bit, am unable to get duplicity to connect with gdocs (worked fine on Fedora 24).

Python 2.7.13
duplicity 0.7.13.1
pydrive 1.3.1

Have redone the google developer authorization procedure, but keep getting the following traceback:

  File "/usr/bin/duplicity", line 1540, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1534, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1372, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1140, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/pydrivebackend.py", line 69, in __init__
    gauth.CommandLineAuth()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 111, in _decorated
    self.LoadCredentials()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 289, in LoadCredentials
    self.LoadCredentialsFile()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 308, in LoadCredentialsFile
    self.credentials = storage.get()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 407, in get
    return self.locked_get()
  File "/usr/lib/python2.7/site-packages/oauth2client/file.py", line 54, in locked_get
    credentials = client.Credentials.new_from_json(content)
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 302, in new_from_json
    module_name = data['_module']
KeyError: '_module'

The credentials file is the json file that I downloaded from the Google site.

?? .... thanks.

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk


_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: KeyError: '_module' with gdocs

duplicity-talk mailing list
In reply to this post by duplicity-talk mailing list
Thanks for the suggestion.  Same problem, persists.  Anyway, the credentials file is already specified in the GOOGLE_DRIVE_SETTINGS file. 
It looks to me like I am either doing something silly with the Google authentication process, or have mixed and matched incompatible versions of required packages.

Any suggestions for which tools to use for debugging the duplicity script, especially how the "_module" key is coming up?



On 2017-09-14 07:31 AM, Kenneth Loafman wrote:
It looks like you do not have GOOGLE_CREDENTIALS_FILE set.  Set it to the location of the filename you got from Google and it should work.

...Ken


On Wed, Sep 13, 2017 at 10:47 AM, Norman Goldstein via Duplicity-talk <[hidden email]> wrote:
After installing Fedora 26 0x86 64-bit, am unable to get duplicity to connect with gdocs (worked fine on Fedora 24).

Python 2.7.13
duplicity 0.7.13.1
pydrive 1.3.1

Have redone the google developer authorization procedure, but keep getting the following traceback:

  File "/usr/bin/duplicity", line 1540, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1534, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1372, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1140, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/pydrivebackend.py", line 69, in __init__
    gauth.CommandLineAuth()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 111, in _decorated
    self.LoadCredentials()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 289, in LoadCredentials
    self.LoadCredentialsFile()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 308, in LoadCredentialsFile
    self.credentials = storage.get()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 407, in get
    return self.locked_get()
  File "/usr/lib/python2.7/site-packages/oauth2client/file.py", line 54, in locked_get
    credentials = client.Credentials.new_from_json(content)
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 302, in new_from_json
    module_name = data['_module']
KeyError: '_module'

The credentials file is the json file that I downloaded from the Google site.

?? .... thanks.

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk



_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: KeyError: '_module' with gdocs

duplicity-talk mailing list
From the traceback you can see that it's coming from the oauth2client module.  I'd look around in there and backtrack through the stack trace, reading the code and looking for the use of _module as a key.  My guess is that something is missing or has changed w.r.t. your Oauth2 installation.

Otherwise, just standard Python debugger or an IDE if you really want to chase it the hard way.

...Ken


On Thu, Sep 14, 2017 at 1:06 PM, Norman Goldstein <[hidden email]> wrote:
Thanks for the suggestion.  Same problem, persists.  Anyway, the credentials file is already specified in the GOOGLE_DRIVE_SETTINGS file. 
It looks to me like I am either doing something silly with the Google authentication process, or have mixed and matched incompatible versions of required packages.

Any suggestions for which tools to use for debugging the duplicity script, especially how the "_module" key is coming up?



On 2017-09-14 07:31 AM, Kenneth Loafman wrote:
It looks like you do not have GOOGLE_CREDENTIALS_FILE set.  Set it to the location of the filename you got from Google and it should work.

...Ken


On Wed, Sep 13, 2017 at 10:47 AM, Norman Goldstein via Duplicity-talk <[hidden email]> wrote:
After installing Fedora 26 0x86 64-bit, am unable to get duplicity to connect with gdocs (worked fine on Fedora 24).

Python 2.7.13
duplicity 0.7.13.1
pydrive 1.3.1

Have redone the google developer authorization procedure, but keep getting the following traceback:

  File "/usr/bin/duplicity", line 1540, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1534, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1372, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1140, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/pydrivebackend.py", line 69, in __init__
    gauth.CommandLineAuth()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 111, in _decorated
    self.LoadCredentials()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 289, in LoadCredentials
    self.LoadCredentialsFile()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 308, in LoadCredentialsFile
    self.credentials = storage.get()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 407, in get
    return self.locked_get()
  File "/usr/lib/python2.7/site-packages/oauth2client/file.py", line 54, in locked_get
    credentials = client.Credentials.new_from_json(content)
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 302, in new_from_json
    module_name = data['_module']
KeyError: '_module'

The credentials file is the json file that I downloaded from the Google site.

?? .... thanks.

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk




_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

SOLVED Re: KeyError: '_module' with gdocs

duplicity-talk mailing list
In reply to this post by duplicity-talk mailing list
I removed the old credentials file, and the system then led me by the hand.  Duplicity is now working.

Thanks for the responses.



On 2017-09-16 04:52 AM, Kenneth Loafman wrote:
From the traceback you can see that it's coming from the oauth2client module.  I'd look around in there and backtrack through the stack trace, reading the code and looking for the use of _module as a key.  My guess is that something is missing or has changed w.r.t. your Oauth2 installation.

Otherwise, just standard Python debugger or an IDE if you really want to chase it the hard way.

...Ken


On Thu, Sep 14, 2017 at 1:06 PM, Norman Goldstein <[hidden email]> wrote:
Thanks for the suggestion.  Same problem, persists.  Anyway, the credentials file is already specified in the GOOGLE_DRIVE_SETTINGS file. 
It looks to me like I am either doing something silly with the Google authentication process, or have mixed and matched incompatible versions of required packages.

Any suggestions for which tools to use for debugging the duplicity script, especially how the "_module" key is coming up?



On 2017-09-14 07:31 AM, Kenneth Loafman wrote:
It looks like you do not have GOOGLE_CREDENTIALS_FILE set.  Set it to the location of the filename you got from Google and it should work.

...Ken


On Wed, Sep 13, 2017 at 10:47 AM, Norman Goldstein via Duplicity-talk <[hidden email]> wrote:
After installing Fedora 26 0x86 64-bit, am unable to get duplicity to connect with gdocs (worked fine on Fedora 24).

Python 2.7.13
duplicity 0.7.13.1
pydrive 1.3.1

Have redone the google developer authorization procedure, but keep getting the following traceback:

  File "/usr/bin/duplicity", line 1540, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1534, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1372, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1140, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/pydrivebackend.py", line 69, in __init__
    gauth.CommandLineAuth()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 111, in _decorated
    self.LoadCredentials()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 289, in LoadCredentials
    self.LoadCredentialsFile()
  File "/usr/lib/python2.7/site-packages/pydrive/auth.py", line 308, in LoadCredentialsFile
    self.credentials = storage.get()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 407, in get
    return self.locked_get()
  File "/usr/lib/python2.7/site-packages/oauth2client/file.py", line 54, in locked_get
    credentials = client.Credentials.new_from_json(content)
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 302, in new_from_json
    module_name = data['_module']
KeyError: '_module'

The credentials file is the json file that I downloaded from the Google site.

?? .... thanks.

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk





_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk