Skip to content

Conversation

pallav-fdsi
Copy link
Contributor

closes #8581

Version comparison had a formatting error resulting in "TypeError: expected string or buffer" and preventing Spyder from loading (and probably other issues). Fixed.

Version comparison had a formatting error resulting in "TypeError: expected string or buffer" and preventing Spyder from loading (and probably other issues). Fixed.
@jreback jreback added this to the 0.15.1 milestone Oct 20, 2014
@jreback
Copy link
Contributor

jreback commented Oct 20, 2014

can you add a note in v0.15.1 (refing the issue). In what cases would this fail? (e.g. if you have no deps then it bypasses that whole try,except), but when would it hit that error?

@pallav-fdsi
Copy link
Contributor Author

Not sure if you mean just leave a comment here? -- I found the issue when the offending code prevented Spyder from launching after I installed the Google Python API. It was also causing the pandas library to think that the API could not be imported, or an error when one wrote "from pandas.io import gbq"

@jreback
Copy link
Contributor

jreback commented Oct 20, 2014

this is not very well tested (really hard as we don't have an authentication setup). Just trying to see if only having some deps caused this to fail.

Latest python-gflags reports it's version number as 2.0 on my Windows 8 machine (Anaconda 64-bit, installed python-gflags via pip). When compared against the string '2.0.0' this resulted in the code to think that the version was not new enough and subsequent calls to to_gbq() failed.
@jreback
Copy link
Contributor

jreback commented Oct 20, 2014

merged via 403f38d
thanks!

@jreback jreback closed this Oct 20, 2014
@jreback jreback mentioned this pull request Oct 20, 2014
@jacobschaer
Copy link
Contributor

I'll see about rerunning the integration tests this coming weekend.

@jacobschaer
Copy link
Contributor

I'm having some permissions issues with our Bigquery automated test suite. However, as with #8590 it seems that gbq's test_requirements() method is failing if the user has bigquery installed (which is a requirement for the automated tests of gbq).

__main__.test_requirements ... SKIP: pandas requires google-api-python-client >= 1.2.0 for Google BigQuery support, current version 1.2

Of course, this may be unrelated to this patch - just thought I'd mention it. It looks like this can be resolved by simply correcting the test_imports() method:

           if LooseVersion(_GOOGLE_API_CLIENT_VERSION) >= '1.2':
                _GOOGLE_API_CLIENT_VALID_VERSION = True

I'm not sure what the consequences of doing this are though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Error in gbq.py

3 participants