superset: When I use superset to query the connected odps database, the error ODPSEngineSpec.execute() takes 3 positional arguments but 4 were given

Bug description

  1. when i query the connected odps database, the error is as follows image

  2. The detailed error log is as follows

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/views/base_api.py", line 119, in wraps
    duration, response = time_function(f, self, *args, **kwargs)
  File "/app/superset/utils/core.py", line 1364, in time_function
    response = func(*args, **kwargs)
  File "/app/superset/views/base_api.py", line 91, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/utils/log.py", line 303, in wrapper
    value = f(*args, **kwargs)
  File "/app/superset/sqllab/api.py", line 409, in execute_sql_query
    command_result: CommandResult = command.run()
  File "/app/superset/utils/decorators.py", line 266, in wrapped
    return on_error(ex)
  File "/app/superset/utils/decorators.py", line 236, in on_error
    raise ex
  File "/app/superset/utils/decorators.py", line 259, in wrapped
    result = func(*args, **kwargs)
  File "/app/superset/commands/sql_lab/execute.py", line 105, in run
    status = self._run_sql_json_exec_from_scratch()
  File "/app/superset/commands/sql_lab/execute.py", line 158, in _run_sql_json_exec_from_scratch
    return self._sql_json_executor.execute(
  File "/app/superset/sqllab/sql_json_executer.py", line 111, in execute
    raise SupersetErrorsException(
superset.exceptions.SupersetErrorsException: [SupersetError(message='odps error: ODPSEngineSpec.execute() takes 3 positional arguments but 4 were given', error_type=, level=, extra={'engine_name': 'ODPS', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
  1. The relevant database and driver versions are as follows: image

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.10

Node version

I don’t know

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn’t find a solution to my problem.
  • I have searched the GitHub issue tracker and didn’t find a similar bug report.
  • I have checked Superset’s logs for errors and if I found a relevant Python stacktrace, I included it here as text in the “additional context” section.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

Should be resolved with PyODPS 0.12.2 release. See https://github.com/aliyun/aliyun-odps-python-sdk/releases/tag/v0.12.2 for details.

  1. When I uninstalled the old version 0.12.1.1 of pyodps and installed the new version 0.12.2, the same error was reported. The details are as follows image
  2. I suspect there is something wrong with the way the connection is made, or pyodps doesn’t really fix the error. image

image Works for me. Given the error message it is quite possible that the correct version is not properly installed for superset as the function signature is already correct for the latest version of superset.

I’m curious how you deployed the superset service. I installed it through k8s helm chart, and then pip install pyodps==0.12.2; my superset version is 4.1.1

Installed with pip inside a virtualenv on host without any containers.