Skip to content

Search causes an internal error (Django exception: InvalidQuery: Raw query must include the primary key) #446

@msabramo

Description

@msabramo

I have a very basic setup with Sentry running on port 9000 using sqlite, basically the configuration from the Quickstart, no gevent installed.

I search and get:

There was an internal server error while processing your request.

You may reference this error as c49b2d7df977464fa7bf8d75a1b427f0$0b9143ace0a36291d19255c95b4db3f4.

View this error in Sentry

The console running Sentry in the foreground has:

Internal Server Error: /default/search/
Traceback (most recent call last):
  File "/www/sentry/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/decorators.py", line 110, in wrapped
    return func(request, *args, **kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/decorators.py", line 47, in _wrapped
    return func(request, project, *args, **kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/frontend/groups.py", line 168, in search
    documents = list(SearchDocument.objects.search(project, query, sort_by=sort))
  File "/www/sentry/lib/python2.7/site-packages/django/db/models/query.py", line 1341, in __iter__
    raise InvalidQuery('Raw query must include the primary key')
InvalidQuery: Raw query must include the primary key
Internal Server Error: /default/search/
Traceback (most recent call last):
  File "/www/sentry/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/decorators.py", line 110, in wrapped
    return func(request, *args, **kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/decorators.py", line 47, in _wrapped
    return func(request, project, *args, **kwargs)
  File "/www/sentry/lib/python2.7/site-packages/sentry/web/frontend/groups.py", line 168, in search
    documents = list(SearchDocument.objects.search(project, query, sort_by=sort))
  File "/www/sentry/lib/python2.7/site-packages/django/db/models/query.py", line 1341, in __iter__
    raise InvalidQuery('Raw query must include the primary key')
InvalidQuery: Raw query must include the primary key

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions