#4550 Failure when running test_search_projects_private (sqlite3.OperationalError)
Opened 3 months ago by sergiodj. Modified 3 months ago

When running "python3 runtests.py run", I see a failure on:

py3-test_pagure_lib

Specifically:

======================================================================
ERROR: test_search_projects_private (tests.test_pagure_lib.PagureLibtests_search_projects): Test the method for private projects


Traceback (most recent call last):
File "/home/sergio/pagure/tests/test_pagure_lib.py", line 341, in test_search_projects_private
self.session, username="pingou", private="foo"
File "/home/sergio/pagure/tests/../pagure/lib/query.py", line 2555, in search_projects
return query.all()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3168, in all
return list(self)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3324, in iter
return self._execute_and_instances(context)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3349, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 399, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 153, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 550, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: users.user

I can provide more info if needed.


Try the patch in #4460. That's supposed to resolve the issue with SQLAlchemy >= 1.3.0 for running with the SQLite backend.

On Saturday, July 20 2019, Neal Gompa wrote:

ngompa added a new comment to an issue you are following:
Try the patch in #4460. That's supposed to resolve the issue with SQLAlchemy >= 1.3.0 for running with the SQLite backend.

Ah, thanks, that commit indeed fixes the issue for me. Not sure if you
prefer this issue to be closed manually now or to wait until the PR is
accepted, so I'll leave it as is. Thanks.

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

@sergiodj The alternative I went with in Fedora, Mageia, and openSUSE is this: https://src.fedoraproject.org/rpms/pagure/blob/master/f/0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch

I did that one because SQLite isn't important for production and I don't run the tests in the package build. The documentation I provide recommends either PostgreSQL or MariaDB.

Login to comment on this ticket.

Metadata