You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error you're encountering is due to a mismatch in the number of arguments expected by the get_url_for_impersonation method in the ClickZettaEngineSpec class. The method is defined to accept four parameters: url, impersonate_user, username, and access_token (though access_token might be commented out) [1].
In your case, it seems that the method is being called with five arguments, which is causing the TypeError. The solution you applied—commenting out the access_token parameter in both superset/models/core.py and superset/db_engine_specs/base.py—effectively reduces the number of arguments passed to match the method's definition, resolving the error.
To prevent this issue in the future, ensure that the method signature in ClickZettaEngineSpec matches the number of arguments being passed in the code. If access_token is not needed, it should be consistently commented out or removed from both the method definition and the call sites.
After commenting out access_token, Add database no longer reports an error, but other errors appear when executing sqllab.
"GET /api/v1/database/1/tables/?q=(force:!f,schema_name:public) HTTP/1.1" 422 -
File "D:\code\python\superset-4.1.1\superset\models\core.py", line 568, in get_raw_connection
yield conn
File "D:\code\python\superset-4.1.1\superset\models\core.py", line 677, in get_df
self.db_engine_spec.execute(cursor, sql_, self)
TypeError: ClickZettaEngineSpec.execute() takes 3 positional arguments but 4 were given
Bug description
Change superset/db_engine_specs/base.py, Comment out access_token.
Screenshots/recordings
Superset version
4.1.1
Python version
3.10
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: