friedmanmax opened a new issue, #30169:
URL: https://github.com/apache/airflow/issues/30169

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-common-sql==1.3.4
   apache-airflow-providers-ftp==3.3.1
   apache-airflow-providers-google==8.11.0
   apache-airflow-providers-http==4.2.0
   apache-airflow-providers-imap==3.1.1
   apache-airflow-providers-sqlite==3.3.1
   
   ### Apache Airflow version
   
   2
   
   ### Operating System
   
   OS X (same issue on AWS)
   
   ### Deployment
   
   Amazon (AWS) MWAA
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   I wrote a mod on top of LookerHook to access the `scheduled_plan_run_once` 
endpoint. The result was the following error.
   
   ```Traceback (most recent call last):
     File "/usr/local/airflow/dags/utils/looker_operators_mod.py", line 125, in 
execute
       resp = self.hook.run_scheduled_plan_once(
     File "/usr/local/airflow/dags/utils/looker_hook_mod.py", line 136, in 
run_scheduled_plan_once
       resp = sdk.scheduled_plan_run_once(plan_to_send)
     File 
"/usr/local/lib/python3.9/site-packages/looker_sdk/sdk/api40/methods.py", line 
10273, in scheduled_plan_run_once
       self.post(
     File 
"/usr/local/lib/python3.9/site-packages/looker_sdk/rtl/api_methods.py", line 
171, in post
       serialized = self._get_serialized(body)
     File 
"/usr/local/lib/python3.9/site-packages/looker_sdk/rtl/api_methods.py", line 
156, in _get_serialized
       serialized = self.serialize(api_model=body)  # type: ignore
   TypeError: serialize() missing 1 required keyword-only argument: 
'converter'```
   
   I was able to get past the error by rewriting the `get_looker_sdk` function 
in LookerHook to initialize with `looker_sdk.init40` instead, which resolved 
the serialize() issue.
   
   ### What you think should happen instead
   
   I don't know why the serialization piece is part of the SDK initialization - 
would love some further context!
   
   ### How to reproduce
   
   As far as I can tell, any call to sdk.scheduled_plan_run_once() causes this 
issue. I tried it with a variety of different dict plans. I only resolved it by 
changing how I initialized the SDK
   
   ### Anything else
   
   n/a
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to