ambika-garg / PowerBI_Airflow_Plugin

Apache Airflow Plugin for a Power BI dataset refresh.
Apache License 2.0
7 stars 3 forks source link

UnboundLocalError: local variable 'response' referenced before assignment #4

Open domagoj-gusic-sb opened 1 month ago

domagoj-gusic-sb commented 1 month ago

Code I use I the same as shown in the README.md.

Installed through requirements.txt.

Error:

[2024-08-04, 13:56:55 UTC] {taskinstance.py:1824} ERROR - Task failed with exception
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow_powerbi_plugin/operators/powerbi.py", line 88, in execute
    refresh_details = self.hook.get_latest_refresh_details(
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow_powerbi_plugin/hooks/powerbi.py", line 190, in get_latest_refresh_details
    history = self.get_refresh_history(dataset_id=dataset_id, group_id=group_id)
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow_powerbi_plugin/hooks/powerbi.py", line 164, in get_refresh_history
    "Failed to retrieve refresh history. Status code: %s", str(response.status_code)
UnboundLocalError: local variable 'response' referenced before assignment
ambika-garg commented 1 week ago

I apologize for late response. I've addressed your issue in the latest version.