Question

sql_query SDK Encoding Error error.SDKError(response.value.decode(encoding=encoding))

  • 28 October 2022
  • 1 reply
  • 15 views

When calling sql_query method, I receive an SDKError for encoding with the below stack trace

SDKError                                  Traceback (most recent call last)
/var/folders/1w/bgs2v0sx40jc74tw7p5lrprc7jdz4b/T/ipykernel_21166/1310340818.py in <module>
----> 1 sql_query = class_object.sdk_client_obj.sql_query("<slug-Id>")

/opt/homebrew/anaconda3/envs/airflow/lib/python3.7/site-packages/looker_sdk/sdk/api40/methods.py in sql_query(self, slug, transport_options)
8007 path=f"/sql_queries/{slug}",
8008 structure=models.SqlQuery,
-> 8009 transport_options=transport_options,
8010 ),
8011 )

/opt/homebrew/anaconda3/envs/airflow/lib/python3.7/site-packages/looker_sdk/rtl/api_methods.py in get(self, path, structure, query_params, transport_options)
141 transport_options=transport_options,
142 )
--> 143 return self._return(response, structure)
144
145 def _get_serialized(self, body: TBody) -> Optional[bytes]:

/opt/homebrew/anaconda3/envs/airflow/lib/python3.7/site-packages/looker_sdk/rtl/api_methods.py in _return(self, response, structure)
85 encoding = response.encoding
86 if not response.ok:
---> 87 raise error.SDKError(response.value.decode(encoding=encoding))
88 ret: TReturn
89 if structure is None:

 


1 reply

i’m getting this as well. did you find a solution for it?

Reply