dosubot[bot] commented on issue #31737: URL: https://github.com/apache/superset/issues/31737#issuecomment-2575092763
<!-- Answer --> 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) <sup>[[1]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/hive.py)</sup>. 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. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/3c92e333-be7a-4d2c-accb-52319837f10d?feedback_type=other)</sup> -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org