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

[bug] from google_cloud_pipeline_components import aiplatform results in TypeError: 'NoneType' object is not iterable #5915

Closed
A-Pot opened this issue Jun 24, 2021 · 3 comments

Comments

@A-Pot
Copy link

A-Pot commented Jun 24, 2021

When I try to import aiplatform from google_cloud_pipeline_components, I get a TypeError, and the import fails.

What steps did you take

To reproduce the issue:

  1. Create a new virtual environment (Python version 3.6.9):
    python3 -m virtualenv gcp_aip

  2. Activate the environment:
    source gcp_aip/bin/activate

  3. Install per instructions:
    pip install -U google-cloud-pipeline-components

  4. Start a new Python session and try to import aiplatform:
    python3 -c 'from google_cloud_pipeline_components import aiplatform'

What happened:

I get a TypeError, specifically the following:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/.env/gcp_aip/lib/python3.6/site-packages/google_cloud_pipeline_components/aiplatform/__init__.py", line 68, in <module>
    aiplatform_sdk.ImageDataset.export_data,
  File "/home/ubuntu/.env/gcp_aip/lib/python3.6/site-packages/google_cloud_pipeline_components/aiplatform/utils.py", line 465, in convert_method_to_component
    output_type
TypeError: 'NoneType' object is not iterable

What did you expect to happen:

I expected the import to succeed.

Environment:

Ubuntu 18.04 / Python 3.6.9.

I suspect this may have something to do with the version of Python. The error above happens with Python 3.6.9. I tried the same process with Python 3.8.5, and I did not get the above error.

Labels

/area components


Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@Bobgy
Copy link
Contributor

Bobgy commented Jun 25, 2021

/assign @sasha-gitg @SinaChavoshi

@Bobgy Bobgy added this to Needs triage in KFP SDK Triage via automation Jun 25, 2021
@ckchow
Copy link

ckchow commented Jul 22, 2021

I managed to work around this by using python 3.9.6. No idea why that would affect this but it appears to help.

@SinaChavoshi
Copy link
Contributor

This issue was fixed by googleapis/python-aiplatform#494

KFP SDK Triage automation moved this from Needs triage to Closed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

6 participants