yoheimuta / google-bigquery-tools

Automatically exported from code.google.com/p/google-bigquery-tools
0 stars 4 forks source link

bq traceback: ImportError: cannot import name anyjson #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Installing bigquery-2.0.2.tar.gz, either with easy_install or setup.py, then 
run bq

I expect to see usage, I suppose. Instead I see a traceback:

Traceback (most recent call last):
  File "/usr/local/bin/bq", line 9, in <module>
    load_entry_point('bigquery==2.0.2', 'console_scripts', 'bq')()
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 305, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2244, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.6/dist-packages/bigquery-2.0.2-py2.6.egg/bq.py", line 24, in <module>
    from apiclient import anyjson
ImportError: cannot import name anyjson

bigquery-2.0.2 on Ubuntu 11.10

Original issue reported on code.google.com by net.equ...@gmail.com on 9 Mar 2012 at 7:01

GoogleCodeExporter commented 8 years ago
I'm seeing exactly this too, with freshly installed Python 2.7.2 on OSX Snow 
Leopard.

Original comment by dan...@danbri.org on 10 Mar 2012 at 12:09

GoogleCodeExporter commented 8 years ago
From CHANGELOG in google-api-python-client-1.0beta8

 - Important changes which might break your code:
    * apiclient.anyjson has moved to oauth2client.anyjson.

changing "from apiclient import anyjson" to "from oauth2client import anyjson" 
in the obvious places seems to do the job (at least I'm not seeing the error 
any more; haven't tested further)

Original comment by dan...@danbri.org on 10 Mar 2012 at 2:31

GoogleCodeExporter commented 8 years ago
This will be fixed in our next release of the bq tool (eta sometime this week). 
Thanks for reporting it.

Original comment by tig...@google.com on 14 Mar 2012 at 10:54

GoogleCodeExporter commented 8 years ago
Fixed! Sorry about the delay.

Original comment by craigcitro@google.com on 24 Mar 2012 at 10:58