-
Notifications
You must be signed in to change notification settings - Fork 27
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
cannot import name 'models' from 'looker_sdk' #82
Comments
Hi all! I'm also getting the error mentioned above, but it also mention if wanted to use 'models40' instead of 'models'. Just in case it helps to close this issue |
I believe the root cause is the import method in I fixed this locally and the error resolved... only to uncover a different error on Test 2:
😞 Also, if there is any guidance on how to set up and run the unit tests I would be more than happy to contribute to this project. |
Note - this is fixed in PR #57 |
Created a PR with all current fixes @ #85 |
FYI, the changes in those PRs are not live on PyPi, meaning if you install with |
Hello!!
Can you please help me with this error:
after installing and running henry --help I get the following:
Traceback (most recent call last): File "/Users/francisco.simone/Documents/henry/henry/bin/henry", line 5, in <module> from henry.cli import main File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/cli.py", line 7, in <module> from henry.commands import analyze, pulse, vacuum File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/commands/pulse.py", line 5, in <module> from looker_sdk import models ImportError: cannot import name 'models' from 'looker_sdk' (/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/looker_sdk/__init__.py)
If I move the models.py to the root folder I'm able to 'run' henry but I get different errors:
Traceback (most recent call last): File "/Users/francisco.simone/Documents/henry/henry/bin/henry", line 8, in <module> sys.exit(main()) File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/cli.py", line 20, in main vacuum.Vacuum.run(user_input) File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/commands/vacuum.py", line 14, in run result = vacuum.explores(model=user_input.model, explore=user_input.explore) File "/Users/francisco.simone/.pyenv/versions/3.7.17/lib/python3.7/contextlib.py", line 74, in inner return func(*args, **kwds) File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/commands/vacuum.py", line 46, in explores field_stats = self.get_explore_field_stats(e) File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/modules/fetcher.py", line 288, in get_explore_field_stats model=explore.model_name, explore=explore.name File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/henry/modules/fetcher.py", line 244, in get_used_explore_fields limit="5000", File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/looker_sdk/sdk/api40/methods.py", line 9240, in run_inline_query transport_options=transport_options, File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/looker_sdk/rtl/api_methods.py", line 180, in post return self._return(response, structure) File "/Users/francisco.simone/Documents/henry/henry/lib/python3.7/site-packages/looker_sdk/rtl/api_methods.py", line 93, in _return raise sdk_error looker_sdk.error.SDKError
Thanks!
The text was updated successfully, but these errors were encountered: