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: NOT NULL constraint failed: silk_request.view_name #71

Closed
biwin opened this issue Jun 3, 2015 · 2 comments
Closed

IntegrityError: NOT NULL constraint failed: silk_request.view_name #71

biwin opened this issue Jun 3, 2015 · 2 comments

Comments

@biwin
Copy link

biwin commented Jun 3, 2015

I'm trying to use with Django 1.8,

The console log,

No request model was available when processing response. Did something go wrong in process_request/process_view?
[03/Jun/2015 07:45:11]"GET / HTTP/1.1" 500 159230

Traceback.

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.8.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'subdomains',
 'silk',
 'events')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'silk.middleware.SilkyMiddleware',
 'subdomains.middleware.SubdomainURLRoutingMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  108.                 response = middleware_method(request)
File "/home/biwin/projects/name/silk/middleware.py" in process_request
  94.             request_model = RequestModelFactory(request).construct_request_model()
File "/home/biwin/projects/name/silk/model_factory.py" in construct_request_model
  169.             body=body)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  127.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/query.py" in create
  348.         obj.save(force_insert=True, using=self.db)
File "/home/biwin/projects/name/silk/models.py" in save
  102.         super(Request, self).save(*args, **kwargs)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  710.                        force_update=force_update, update_fields=update_fields)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  738.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
  822.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
  861.                                using=using, raw=raw)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  127.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/query.py" in _insert
  920.         return query.get_compiler(using=using).execute_sql(return_id)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  971.                 cursor.execute(sql, params)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  79.             return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
  97.                 six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)
File "/home/biwin/dj18/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
  318.         return Database.Cursor.execute(self, query, params)

Exception Type: IntegrityError at /
Exception Value: NOT NULL constraint failed: silk_request.view_name
@mtford90
Copy link
Collaborator

mtford90 commented Jun 4, 2015

Howdy, this should be fixed in master, d'ya wanna give that a try? I'll likely be pushing a new release today anyway.

You can execute:

pip install -e git+https://github.com/mtford90/silk.git#egg=silk

@mtford90
Copy link
Collaborator

mtford90 commented Jun 4, 2015

@biwin the new version is now on pypi, once you've updated you should stop seeing this issue

@mtford90 mtford90 closed this as completed Jun 4, 2015
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