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

Import Error #6

Closed
Bernhard-Fluehmann opened this issue Jul 22, 2021 · 4 comments
Closed

Import Error #6

Bernhard-Fluehmann opened this issue Jul 22, 2021 · 4 comments
Labels
wontfix This will not be worked on

Comments

@Bernhard-Fluehmann
Copy link

I would like to use your api client. It is installed and setup as described in the readme and throws an error at line 1:

from strigo import Strigo

The exception is:

$ImportError: cannot import name 'endpoints' from partially initialized module 'strigo' (most likely due to a circular import) (/Users/flb/.pyenv/versions/3.9.5/lib/python3.9/site-packages/strigo/__init__.py)

If I run a test script directly in the pystrigo directory it works. Can you give me a hint what may be the problem?
Thanks

@nir0s
Copy link
Contributor

nir0s commented Jul 22, 2021

Seems like this is a regression in cpython's upstream.

dask/distributed#4168

Can you try and use Python 3.7/8?

@Bernhard-Fluehmann
Copy link
Author

Hi @nir0s Thank you for your fast reply.

Same problem with python 3.8.1

➜  strigo-dynamic-inventory git:(master) ✗ python strigo_test.py
Traceback (most recent call last):
  File "strigo_test.py", line 1, in <module>
    from strigo import Strigo
  File "/Users/flb/.pyenv/versions/3.8.1/lib/python3.8/site-packages/strigo/__init__.py", line 1, in <module>
    from .client import Strigo  # pylint-disable
  File "/Users/flb/.pyenv/versions/3.8.1/lib/python3.8/site-packages/strigo/client.py", line 10, in <module>
    from . import endpoints
ImportError: cannot import name 'endpoints' from partially initialized module 'strigo' (most likely due to a circular import) (/Users/flb/.pyenv/versions/3.8.1/lib/python3.8/site-packages/strigo/__init__.py)

and python 3.7.2

➜  strigo-dynamic-inventory git:(master) ✗ python strigo_test.py                                                                      
Traceback (most recent call last):
  File "strigo_test.py", line 1, in <module>
    from strigo import Strigo
  File "/Users/flb/.pyenv/versions/3.7.2/lib/python3.7/site-packages/strigo/__init__.py", line 1, in <module>
    from .client import Strigo  # pylint-disable
  File "/Users/flb/.pyenv/versions/3.7.2/lib/python3.7/site-packages/strigo/client.py", line 10, in <module>
    from . import endpoints
ImportError: cannot import name 'endpoints' from 'strigo' (/Users/flb/.pyenv/versions/3.7.2/lib/python3.7/site-packages/strigo/__init__.py)

Any other ideas?

@nir0s
Copy link
Contributor

nir0s commented Jul 22, 2021

Yeah... that's absolutely my bad here.

Fixed here 2814a74.

Please try now.

@stale
Copy link

stale bot commented Jan 19, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Jan 19, 2022
@stale stale bot closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Development

No branches or pull requests

2 participants