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

IntegrityError: columns key, value are not unique #427

Closed
mfrasca opened this issue Apr 13, 2012 · 6 comments · May be fixed by E-LLP/sentry#45, E-LLP/sentry#47, E-LLP/sentry#48 or E-LLP/sentry#50
Closed

IntegrityError: columns key, value are not unique #427

mfrasca opened this issue Apr 13, 2012 · 6 comments · May be fixed by E-LLP/sentry#45, E-LLP/sentry#47, E-LLP/sentry#48 or E-LLP/sentry#50

Comments

@mfrasca
Copy link
Contributor

mfrasca commented Apr 13, 2012

David, I'm not finally convinced this is a strictly Sentry issue, I'm putting it here because I need to solve this if I want to write a sentry client in R.

the package I'm using in R complains if I put numeric values in 'project' and 'level' and only works if I convert them to character.
I am going to report and investigate that first anyway, but can you have a look at this funny message on the console that contains the running Sentry server? this happens if I put string values where you expect numeric. I don't know if the error is related to that and maybe I will find this problem also after managing to convince RCurl to send numeric values.

Unable to process log entry: columns key, value are not unique
Traceback (most recent call last):
  File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/manager.py", line 477, in from_kwargs
    group, is_new, is_sample = self._create_group(event, **group_kwargs)
  File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/manager.py", line 620, in _create_group
    value=value,
  File "/usr/share/sentry/local/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/db/models/manager.py", line 135, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)
  File "/usr/share/sentry/local/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/db/models/query.py", line 393, in get_or_create
    raise e
IntegrityError: columns key, value are not unique
Client 'r-logging.handler' raised API error: 
Traceback (most recent call last):
  File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/web/api.py", line 85, in store
    project = project_from_auth_vars(auth_vars, data)
  File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/coreapi.py", line 81, in project_from_auth_vars
    raise APIForbidden('Invalid signature')
APIForbidden

in my R environment I just receive the Invalid Signature reply.

@mfrasca
Copy link
Contributor Author

mfrasca commented Apr 13, 2012

I had written the report while running a distribution, now I am on the "bleeding edge", but I don't see how to get the public and private keys of a project from the web interface.

@dcramer
Copy link
Member

dcramer commented Apr 13, 2012

It looks like something went wrong with your migrations. That table shouldn't be unique on key value, but rather it should be project, key, value.

David Cramer

twitter.com/zeeg
disqus.com/zeeg

On Friday, April 13, 2012 at 4:42 AM, Mario Frasca wrote:

David, this is probably not strictly a Sentry issue, I'm putting it here because I need to solve this if I want to write a sentry client in R.

the package I'm using in R complains if I put numeric values in 'project' and 'level' and only works if I convert them to character.
I am going to report and investigate that first anyway, but can you have a look at this funny message on the console that contains the running Sentry server? this happens if I put string values where you expect numeric. I don't know if the error is related to that and maybe I will find this problem also after managing to convince RCurl to send numeric values.

Unable to process log entry: columns key, value are not unique
Traceback (most recent call last):
File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/manager.py", line 477, in from_kwargs
group, is_new, is_sample = self._create_group(event, **group_kwargs)
File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/manager.py", line 620, in _create_group
value=value,
File "/usr/share/sentry/local/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/db/models/manager.py", line 135, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/usr/share/sentry/local/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/db/models/query.py", line 393, in get_or_create
raise e
IntegrityError: columns key, value are not unique
Client 'r-logging.handler' raised API error: 
Traceback (most recent call last):
File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/web/api.py", line 85, in store
project = project_from_auth_vars(auth_vars, data)
File "/usr/share/sentry/local/lib/python2.7/site-packages/sentry-3.8.2-py2.7.egg/sentry/coreapi.py", line 81, in project_from_auth_vars
raise APIForbidden('Invalid signature')
APIForbidden

in my R environment I just receive the Invalid Signature reply.


Reply to this email directly or view it on GitHub:
https://github.com/dcramer/sentry/issues/427

@mfrasca
Copy link
Contributor Author

mfrasca commented Apr 14, 2012

the error came after this installation:

virtualenv /usr/share/sentry/
source /usr/share/sentry/bin/activate
easy_install -U sentry

now I cloned it from github and I installed it like this:

rm -fr /usr/share/sentry/*
virtualenv /usr/share/sentry/
source /usr/share/sentry/bin/activate
python setup.py install

in both cases I did the three steps:

sentry init /usr/share/sentry/etc/sentry.conf.py
sentry --config=/usr/share/sentry/etc/sentry.conf.py upgrade
sentry --config=/usr/share/sentry/etc/sentry.conf.py start

currently I don't manage to go much further, I am facing a very basilar question!
how do I ask sentry for public and private keys of projects?
I do not see them if I follow the instructions that worked with the sentry coming with easy_install.
http://raven.readthedocs.org/en/latest/config/index.html#the-sentry-dsn
(by the way, did I miss it, or is this piece of information about sentry is only in the raven documentation?)

@dcramer
Copy link
Member

dcramer commented Apr 14, 2012

What database is this?

You'll get your public/secret keys by logging into the sentry web UI and selecting the project

David Cramer

twitter.com/zeeg
disqus.com/zeeg

On Friday, April 13, 2012 at 11:02 PM, Mario Frasca wrote:

the error came after this installation:

virtualenv /usr/share/sentry/
source /usr/share/sentry/bin/activate
easy_install -U sentry

now I cloned it from github and I installed it like this:

rm -fr /usr/share/sentry/*
virtualenv /usr/share/sentry/
source /usr/share/sentry/bin/activate
python setup.py install

in both cases I did the three steps:

sentry init /usr/share/sentry/etc/sentry.conf.py
sentry --config=/usr/share/sentry/etc/sentry.conf.py upgrade
sentry --config=/usr/share/sentry/etc/sentry.conf.py start

currently I don't manage to go much further, I am facing a very basilar question!
how do I ask sentry for public and private keys of projects?
I do not see them if I follow the instructions that worked with the sentry coming with easy_install.
http://raven.readthedocs.org/en/latest/config/index.html#the-sentry-dsn


Reply to this email directly or view it on GitHub:
https://github.com/dcramer/sentry/issues/427#issuecomment-5129171

@mfrasca
Copy link
Contributor Author

mfrasca commented Apr 14, 2012

what database is this?

sqlite.

You'll get your public/secret keys by logging into the sentry web UI and selecting the project

yes, that is what the doc says too
»The DSN can be found in Sentry by navigation to Account -> Projects -> [Project Name] -> [Member Name]. Its template resembles the following:«

I don't see it in my sentry site.
maybe affected by some settings?
keep in mind I do not use sentry, so zero experience on this front.

@mfrasca
Copy link
Contributor Author

mfrasca commented Apr 18, 2012

installed the patch solving issue #428, dropped the database, started again.
works.
thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.