Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
yujun2021 opened this issue Dec 29, 2024 · 6 comments
Labels
sqllab Namespace | Anything related to the SQL Lab

Comments

@yujun2021
Copy link

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.
Copy link

dosubot bot commented Dec 29, 2024

@yujun2021 Hello there! I'm Dosu, a bot here to help you with bug fixes, questions, and becoming a contributor. Let's tackle this issue together while we wait for a human maintainer.

The error you're encountering indicates that the ODPSEngineSpec.execute() method is being called with more arguments than it expects. This typically suggests a mismatch between the method's implementation and how it's being invoked.

To resolve this issue, you can try the following steps:

  1. Check the Method Signature: Verify the current implementation of the ODPSEngineSpec.execute() method in your Superset codebase. Ensure that the number of arguments being passed matches the method's signature.

  2. Review Recent Changes: If there have been recent updates to the Superset codebase or the ODPS-related packages (odps or pyodps), check if any changes might have affected the method signature or its usage.

  3. Compatibility: Ensure that the versions of Superset, odps, and pyodps you are using are compatible. Sometimes, version mismatches can lead to such issues.

  4. Custom Modifications: If there are any custom modifications or extensions in your Superset setup, review them to ensure they align with the expected method signatures.

If these steps do not resolve the issue, you may need to look into the specific implementation details of the ODPSEngineSpec class and how it interacts with the rest of the Superset codebase.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Dec 29, 2024
@AasmitPadea
Copy link

@dosu please assign this issue to me

@yujun2021
Copy link
Author

@dosu please assign this issue to me

Is there any solution?

Copy link

dosubot bot commented Dec 31, 2024

Could you provide more details about any recent changes or updates made to your Superset setup or the ODPS-related packages? Additionally, are there any custom modifications in your Superset environment that might affect the ODPSEngineSpec.execute() method? This information could help in identifying the root cause of the issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@wjsi
Copy link

wjsi commented Jan 3, 2025

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.

@yujun2021
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

No branches or pull requests

3 participants