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
{{ message }}
Repository navigation
'tuple' object has no attribute 'get when running sql.query #31
i'm using python 3.8 and sqlalchemy==2.0.31 when trying to run [sql.query] action i got following error:
"stderr": "Traceback (most recent call last):\n File \"/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py\", line 395, in <module>\n obj.run()\n File \"/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py\", line 214, in run\n output = action.run(**self._parameters)\n File \"/opt/stackstorm/packs/sql/actions/generic_query.py\", line 22, in run\n with self.db_connection(kwargs_dict) as conn:\n File \"/usr/lib/python3.8/contextlib.py\", line 113, in __enter__\n return next(self.gen)\n File \"/opt/stackstorm/packs/sql/actions/lib/base_action.py\", line 129, in db_connection\n self.engine = sqlalchemy.create_engine(database_connection_string, echo=False)\n File \"<string>\", line 2, in create_engine\n File \"/opt/stackstorm/virtualenvs/sql/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py\", line 281, in warned\n return fn(*args, **kwargs) # type: ignore[no-any-return]\n File \"/opt/stackstorm/virtualenvs/sql/lib/python3.8/site-packages/sqlalchemy/engine/create.py\", line 548, in create_engine\n u, plugins, kwargs = u._instantiate_plugins(kwargs)\n File \"/opt/stackstorm/virtualenvs/sql/lib/python3.8/site-packages/sqlalchemy/engine/url.py\", line 726, in _instantiate_plugins\n plugin_names = util.to_list(self.query.get(\"plugin\", ()))\nAttributeError: 'tuple' object has no attribute 'get'\n",
Activity
daBONDi commentedon Dec 3, 2024
have the same problem, with a mssql+pymssql connection.
Do you figured it out?
daBONDi commentedon Dec 4, 2024
I think i found it.
sqlalchmey make breaking changes on 2.x
requirements.txt have no version definition for sqlalchmey, so it installs 2.x
changed requirements.txt to 1.4.54 fixed the issue it seems.