looker-open-source / henry

A command line tool for Looker instance cleanup
MIT License
79 stars 27 forks source link

looker_sdk.error.SDKError - Endpoints #80

Closed javier-gismero-deel closed 4 months ago

javier-gismero-deel commented 4 months ago

Hi there,

Last week, I received this communication from Looker. Since then, I have had problems using certain Henry commands, such as henry vacuum models

Important note: these commands were previously working and I did not any changes on the python version (3.10) nor in the looker sdk version (23.0)

(venv) (base) javiergismero@Javier Henry % henry vacuum explores --model eor --explore eor_contracts --timeout 120000 Traceback (most recent call last): File "/Users/javiergismero/PycharmProjects/data/venv/bin/henry", line 8, in sys.exit(main()) File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/henry/cli.py", line 20, in main vacuum.Vacuum.run(user_input) File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/henry/commands/vacuum.py", line 14, in run result = vacuum.explores(model=user_input.model, explore=user_input.explore) File "/opt/homebrew/Cellar/python@3.10/3.10.13_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 79, in inner return func(*args, **kwds) File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/henry/commands/vacuum.py", line 46, in explores field_stats = self.get_explore_field_stats(e) File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/henry/modules/fetcher.py", line 287, in get_explore_field_stats field_stats = self.get_used_explore_fields( File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/henry/modules/fetcher.py", line 225, in get_used_explore_fields resp = self.sdk.run_inline_query( File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/looker_sdk/sdk/api40/methods.py", line 9052, in run_inline_query self.post( File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/looker_sdk/rtl/api_methods.py", line 180, in post return self._return(response, structure) File "/Users/javiergismero/PycharmProjects/data/venv/lib/python3.10/site-packages/looker_sdk/rtl/api_methods.py", line 93, in _return raise sdk_error looker_sdk.error.SDKError

image (15)

Sedosa commented 4 months ago

Hello Javier, I had this issue today. I think it is due to this line: here. Note that the workspace is hardcoded as production, whereas the current default is Looker (if you're using hosted Looker). To fix I suggest removing that line, or parameterising it. When I removed that line and reinstalled the updated package (locally) it worked,

I'm unsure if this is actively maintained anymore but if urgent I suggest forking the repository and implementing fixes on that, and installing from that repository in future.

javier-gismero-deel commented 4 months ago

thanks @Sedosa, I followed the steps you suggested and Henry is working back again. Appreciated!!