gDoc python API import failure

*爱你&永不变心* 提交于 2019-12-11 04:16:35

问题


When I try to use gDoc python API following instruction at python_client_lib

I got below error:

In [3]: import gdata
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-fc99779d388d> in <module>()
----> 1 import gdata

/Users/e12714/git/bin/anaconda/lib/python2.7/site-packages/gdata/__init__.py in <module>()
    107 
    108 
--> 109 class LinkFinder(atom.LinkFinder):
    110   """An "interface" providing methods to find link elements
    111 

AttributeError: 'module' object has no attribute 'LinkFinder'

What's wrong with me? Any python module missed?


回答1:


Just had the same problem.

Issue was due to having atom-0.3.5 installed.

It can be solved by installing pyatom instead of the (optimised, c-implemented) atom




回答2:


I was able to rectify this issue by removing all traces of atom from my Python installation and installing the latest gdata release (2.0.18) (using setup.py) from here.

That release includes a version of atom, with the necessary LinkFinder class definition.

It's obviously an issue if you need the separate, more recent atom, in which case you'll have to use virtualenv.




回答3:


Based on the previous recommendations. I installed the latest version of atom via pip. That did the trick for me.

pip install atom


来源:https://stackoverflow.com/questions/20647064/gdoc-python-api-import-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!