ASynK icon indicating copy to clipboard operation
ASynK copied to clipboard

ImportError: cannot import name discovery

Open leArthurDent opened this issue 5 years ago • 2 comments

After installing the dependencies the command "python asynk.py" gives the following error:

Traceback (most recent call last):
  File "asynk.py", line 30, in <module>
    from   asynk_core       import Asynk, AsynkParserError
  File "/home/le_ArthurDent/bin/ASynK/asynk/asynk_core.py", line 40, in <module>
    from   sync             import Sync
  File "/home/le_ArthurDent/bin/ASynK/asynk/sync.py", line 30, in <module>
    from   pimdb_gc     import GCPIMDB
  File "/home/le_ArthurDent/bin/ASynK/asynk/pimdb_gc.py", line 28, in <module>
    from   apiclient import discovery
ImportError: cannot import name discovery

This can eassily be corrected by replacing "apiclient" with "googleapiclient" in file "asynk/pimdb_gc.py" on line 28. I am on openSUSE Tumbleweed with apiclient 1.0.3 and google-api-python-client 1.7.8.

I am not very familiar with python but as far as I can reconstruct from some research on the topic the module was originally named "apiclient" and is now "googleapiclient".

leArthurDent avatar Mar 06 '19 17:03 leArthurDent

Can you do a "ls -al libs" in the asynk directory?

skarra avatar Mar 09 '19 06:03 skarra

Sure, there you go:

`sascha@linux-td6z:~/bin/ASynK> ls -al lib insgesamt 188

drwxr-xr-x 6 sascha users 235 6. Mär 17:53 . drwxr-xr-x 11 sascha users 4096 7. Mär 13:14 .. -rw-r--r-- 1 sascha users 4861 6. Mär 17:51 asynk_mapitags.py lrwxrwxrwx 1 sascha users 15 6. Mär 17:51 atom -> .gdata/src/atom lrwxrwxrwx 1 sascha users 40 6. Mär 17:51 caldavclientlibrary -> .CalDAVClientLibrary/caldavclientlibrary drwxr-xr-x 4 sascha users 195 6. Mär 17:52 .CalDAVClientLibrary -rw-r--r-- 1 sascha users 87946 6. Mär 17:51 demjson.py -rw-r--r-- 1 sascha users 71765 6. Mär 17:53 demjson.pyc drwxr-xr-x 6 sascha users 242 6. Mär 17:52 .gdata lrwxrwxrwx 1 sascha users 16 6. Mär 17:51 gdata -> .gdata/src/gdata -rw-r--r-- 1 sascha users 5676 6. Mär 17:51 iso8601.py -rw-r--r-- 1 sascha users 5673 6. Mär 17:53 iso8601.pyc drwxr-xr-x 4 sascha users 104 6. Mär 17:52 .pyews lrwxrwxrwx 1 sascha users 12 6. Mär 17:51 pyews -> .pyews/pyews drwxr-xr-x 3 sascha users 210 6. Mär 17:51 s `

Edit: Manually inserted the linebreak in line 3 in the terminal output, because without no linebreaks were recognized at all.

leArthurDent avatar Mar 11 '19 07:03 leArthurDent