ImportError: cannot import name __version__
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openerp-google-api |
New
|
Undecided
|
Unassigned |
Bug Description
Openerp 7.
Installed the following dependencies:
pip install --upgrade google-
pip install apiclient
pip install oauth2client
pip install uritemplate
pip install argparse
pip install urllib3
Get the error when trying to insntall
OpenERP Server Error
Client Traceback (most recent call last):
File "/opt/bma/
response[
File "/opt/bma/
action = self._call_kw(req, model, method, args, {})
File "/opt/bma/
return getattr(
File "/opt/bma/
result = self.proxy.
File "/opt/bma/
result = self.session.
File "/opt/bma/
raise xmlrpclib.
Server Traceback (most recent call last):
File "/opt/bma/
return openerp.
File "/opt/bma/
result = ExportService.
File "/opt/bma/
res = fn(db, uid, *params)
File "/opt/bma/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/bma/
return f(self, dbname, *args, **kwargs)
File "/opt/bma/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/bma/
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/bma/
self.
File "/opt/bma/
handler.
File "/opt/bma/
m = __import_
File "/opt/bma/
mod = imp.load_
File "/opt/bma/
import google_calendar
File "/opt/bma/
from apiclient import discovery
File "/usr/local/
from apiclient.http import HttpRequest
File "/usr/local/
from model import JsonModel
File "/usr/local/
from apiclient import __version__
ImportError: cannot import name __version__
Hey,
I know this is old, but it seems that it's a Google's API problem
As stated here: http:// xmodulo. com/2013/ 12/integrate- google- calendar- linux-desktop. html#comment- 5370
I did:
The fix is, as you mention, to edit 'apiclient/ model.py'
Change
from apiclient import __version__
to
from mimeparse import __version__
The file can be on /usr/local/ lib/python2. 7/dist- packages/ apiclient/ model.py
In my case it was on /usr/lib/ python2. 6/site- packages/ apiclient
and it worked.