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

Listing of distro packages is broken #709

Closed
voxik opened this issue Jan 17, 2019 · 1 comment
Closed

Listing of distro packages is broken #709

voxik opened this issue Jan 17, 2019 · 1 comment
Labels
Medium Priority This ticket has a medium priority type.bug
Milestone

Comments

@voxik
Copy link
Contributor

voxik commented Jan 17, 2019

$ curl https://release-monitoring.org/distro/Fedora/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>
@voxik voxik changed the title Listing of distros packages is broken Listing of distro packages is broken Jan 17, 2019
@Zlopez
Copy link
Contributor

Zlopez commented Jan 17, 2019

I checked this in current master and it looks like it is trying to use lower on boolean value.
Here is the log output:

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask_restful/__init__.py", line 269, in error_router
    return original_handler(e)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask_restful/__init__.py", line 269, in error_router
    return original_handler(e)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/vagrant/devel/anitya/ui.py", line 300, in distro
    Session, distro=distroname, page=page)
  File "/home/vagrant/devel/anitya/db/models.py", line 478, in by_distro
    return query.all()
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 2956, in all
    return list(self)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3112, in __iter__
    return self._execute_and_instances(context)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3137, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 974, in execute
    return meth(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 273, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1093, in _execute_clauseelement
    distilled_params,
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1234, in _execute_context
    e, statement, parameters, cursor, context
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1452, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 276, in reraise
    raise value.with_traceback(tb)
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1230, in _execute_context
    cursor, statement, parameters, context
  File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 536, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) function lower(boolean) does not exist
LINE 3: WHERE projects.id = packages.project_id AND lower(distros.na...
                                                    ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
 [SQL: 'SELECT projects.id AS projects_id, projects.name AS projects_name, projects.homepage AS projects_homepage, projects.backend AS projects_backend, projects.ecosystem_name AS projects_ecosystem_name, projects.version_url AS projects_version_url, projects.regex AS projects_regex, projects.version_prefix AS projects_version_prefix, projects.insecure AS projects_insecure, projects.version_scheme AS projects_version_scheme, projects.latest_version AS projects_latest_version, projects.logs AS projects_logs, projects.check_successful AS projects_check_successful, projects.last_check AS projects_last_check, projects.next_check AS projects_next_check, projects.updated_on AS projects_updated_on, projects.created_on AS projects_created_on \nFROM projects, packages, distros \nWHERE projects.id = packages.project_id AND lower(distros.name = packages.distro_name) = lower(%(lower_1)s) ORDER BY lower(projects.name) \n LIMIT %(param_1)s OFFSET %(param_2)s'] [parameters: {'lower_1': 'Fedora', 'param_1': 50, 'param_2': 0}] (Background on this error at: http://sqlalche.me/e/f405)

@Zlopez Zlopez added the Medium Priority This ticket has a medium priority label Jan 18, 2019
@Zlopez Zlopez added this to the 0.16.0 milestone Feb 21, 2019
@Zlopez Zlopez closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Priority This ticket has a medium priority type.bug
Projects
None yet
Development

No branches or pull requests

2 participants