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

Python SDK v24.18.0 can't import looker_sdk #1518

Open
wsjk opened this issue Oct 11, 2024 · 4 comments · May be fixed by #1521
Open

Python SDK v24.18.0 can't import looker_sdk #1518

wsjk opened this issue Oct 11, 2024 · 4 comments · May be fixed by #1521
Labels
p3 Priority 3 python Python SDK issues

Comments

@wsjk
Copy link

wsjk commented Oct 11, 2024

Unable to run import looker_sdk anymore since new Python SDK release

% python
Python 3.10.15 (main, Oct  3 2024, 02:24:49) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import looker_sdk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/xxxxx/anaconda3/envs/mwaa251/lib/python3.10/site-packages/looker_sdk/__init__.py", line 25, in <module>
    from looker_sdk.rtl import api_settings
ModuleNotFoundError: No module named 'looker_sdk.rtl'
>>> 
@hendrixtlan
Copy link

a temporary workaround could be install a previous version:
!pip install looker-sdk==23.2.0
import looker_sdk

@jeremytchang jeremytchang linked a pull request Oct 16, 2024 that will close this issue
@jeremytchang
Copy link
Collaborator

I have a fix here: #1521

For those in this thread, can you try installing the python sdk from the branch and confirm in this thread it works? The pip command should be:

pip install 'looker-sdk @ git+https://github.com/looker-open-source/sdk-codegen.git@fix_py_setup#subdirectory=python'

You'll need to uninstall the original looker-sdk in your pip first:

pip uninstall looker-sdk

The above installation instructions, or downgrading to 24.16.0 should suffice as a workaround until we release this change.

@nilsjesper
Copy link

@jeremytchang - installing from that branch worked for me (I was seeing the .rtl error before)

@mosquire
Copy link

@jeremytchang Installing from that branch fixed this issue for me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Priority 3 python Python SDK issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants