Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to insert data in Big query using custom prediction routine #2627

Closed
rshah1990 opened this issue Dec 17, 2019 · 9 comments
Closed

unable to insert data in Big query using custom prediction routine #2627

rshah1990 opened this issue Dec 17, 2019 · 9 comments
Assignees
Labels
bigquery ML type: question Request for information or clarification. Not an issue.

Comments

@rshah1990
Copy link

rshah1990 commented Dec 17, 2019

When i am trying to insert a record in big query using from pandas.io import gbq , it throws some installation error.

Code:

final_df.to_gbq(destination_table="dataset_logging.drift_detection",project_id="advance-vector-233712",if_exists='append')

pandas-gbq requires google-cloud-bigquery: cannot import name 'collections_abc' from 'six.moves'

image

@tswast
Copy link
Contributor

tswast commented Dec 17, 2019

This is a duplicate of googleapis/google-cloud-python#9965. A fix was released in google-cloud-bigquery 1.23.1.

To fix, please upgrade your google-cloud-bigquery library and the six package.

pip install --upgrade six

@tswast tswast closed this as completed Dec 17, 2019
@rshah1990
Copy link
Author

This is a duplicate of googleapis/google-cloud-python#9965. A fix was released in google-cloud-bigquery 1.23.1.

To fix, please upgrade your google-cloud-bigquery library and the six package.

pip install --upgrade six

I have updated the package but its still not working.
my setup.py file:

**from setuptools import setup

REQUIRED_PACKAGES = ['sklearn','numpy','pandas','google-cloud-bigquery == 1.23.1','six == 1.13.0','pandas-gbq']

setup(
name='my_custom_code',
version='0.1',
install_requires=REQUIRED_PACKAGES,
scripts=['scikit-predictor.py'])**

Python Version: 3.5

Error:

image

@tswast
Copy link
Contributor

tswast commented Dec 18, 2019

Can you provide more of the ImportError traceback? It's not clear to me in which package the import is failing.

@rshah1990
Copy link
Author

I have uploaded sample code with setup file, I have also shared entire log file here , Please let me know in case you need more information.

git.zip

@tswast tswast reopened this Dec 18, 2019
@tswast tswast assigned gogasca and unassigned tswast Dec 18, 2019
@tswast tswast added the ML label Dec 18, 2019
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 18, 2019
@tswast
Copy link
Contributor

tswast commented Dec 18, 2019

Gonzalo, can you investigate this problem with using BigQuery from AI Platform? I can't tell from the logs what might be causing this error.

@tswast tswast added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Dec 18, 2019
@yoshi-automation yoshi-automation added triage me I really want to be triaged. and removed triage me I really want to be triaged. labels Dec 18, 2019
@rshah1990
Copy link
Author

are you guys able to reproduce the issue ?
As mentioned in reference post that issue has been resolved , can you share the exact version of google-cloud-bigquery , six & pandas-gbq

@andrewferlitsch
Copy link
Contributor

@gogasca PTAL

@gogasca
Copy link
Contributor

gogasca commented Apr 20, 2020

We support Python 3.7. Can you please try it:

  • Python 3.7
  • google-cloud-bigquery 1.24.0
  • pandas-gbq 0.13.1

@gogasca gogasca removed their assignment May 1, 2020
@tbpg
Copy link
Contributor

tbpg commented May 11, 2020

We haven't heard back in a few weeks. So, I'm going to close this. But, feel free to comment or open another issue if you have trouble with another sample.

@tbpg tbpg closed this as completed May 11, 2020
@tbpg tbpg self-assigned this May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery ML type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

7 participants