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

Database installations seems to be failing #3

Closed
amir-hadi opened this issue Aug 23, 2013 · 3 comments
Closed

Database installations seems to be failing #3

amir-hadi opened this issue Aug 23, 2013 · 3 comments

Comments

@amir-hadi
Copy link

Hi,

I just upgraded to sentry 6.0.6 and installed your plugin. After upgrading the database (sentry upgrade) and restarting sentry, your plugin is visible in the projects and enabled, but in the logs I see the following error:

Error processing 'actions' on 'CommentsPlugin': (1146, "Table 'sentry.sentry_comments_groupcomments' doesn't exist")
Traceback (most recent call last):
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/sentry/utils/safe.py", line 19, in safe_execute
    result = func(*args, **kwargs)
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/sentry_comments/plugin.py", line 77, in actions
    action_list.append((self.get_title(group), self.get_url(group)))
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/sentry_comments/plugin.py", line 39, in get_title
    count = GroupComments.objects.filter(group=group).count()
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/models/query.py", line 388, in count
    return self.query.get_count(using=self.db)
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/models/sql/query.py", line 428, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/models/sql/query.py", line 394, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
    cursor.execute(sql, params)
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 130, in execute
    six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
  File "/var/sentry/sentryenv/lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 120, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
    raise errorclass, errorvalue
DatabaseError: (1146, "Table 'sentry.sentry_comments_groupcomments' doesn't exist")

It looks like that even I upgraded (migrated) the sentry databases, your plugins tables aren't created. Any ideas what I am missing?

Cheers,
Amir

@andialbrecht
Copy link
Owner

Thanks for reporting! This was an documentation issue. You'll have to add the plugin to INSTALLED_APPS in your sentry configuration:

INSTALLED_APPS += ('sentry_comments',)

and run sentry --config=your.conf.py upgrade to sync the tables.

@amir-hadi
Copy link
Author

Thank you, this solved my problem. This was my first sentry plugin installed. For other starters: don't forget to import sentry configuration settings in your sentry.conf.py.

from sentry.conf.server import *

@andialbrecht
Copy link
Owner

FTR, I'm still not sure if this is an issue with Sentry and how it loads apps that register themselve using the sentry.apps entrypoint: getsentry/sentry#1042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants