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

Django 1.7 support #7

Open
miki725 opened this issue Nov 19, 2014 · 3 comments
Open

Django 1.7 support #7

miki725 opened this issue Nov 19, 2014 · 3 comments

Comments

@miki725
Copy link
Owner

miki725 commented Nov 19, 2014

Traceback:
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  583.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  195.             if not self.has_permission(request):
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/admin/sites.py" in has_permission
  152.         return request.user.is_active and request.user.is_staff
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/utils/functional.py" in inner
  224.             self._setup()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/utils/functional.py" in _setup
  357.         self._wrapped = self._setupfunc()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/auth/middleware.py" in <lambda>
  22.         request.user = SimpleLazyObject(lambda: get_user(request))
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/auth/middleware.py" in get_user
  10.         request._cached_user = auth.get_user(request)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in get_user
  152.         user_id = request.session[SESSION_KEY]
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in __getitem__
  49.         return self._session[key]
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in _get_session
  175.                 self._session_cache = self.load()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py" in load
  21.                 expire_date__gt=timezone.now()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  92.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/query.py" in get
  351.         num = len(clone)
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/query.py" in __len__
  122.         self._fetch_all()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all
  966.             self._result_cache = list(self.iterator())
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/query.py" in iterator
  265.         for row in compiler.results_iter():
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
  700.         for rows in self.execute_sql(MULTI):
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  784.         cursor = self.connection.cursor()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/backends/__init__.py" in cursor
  163.         self.validate_thread_sharing()
File "/Volumes/Data/Users/miki725/.virtualenvs/gevent/lib/python2.7/site-packages/django/db/backends/__init__.py" in validate_thread_sharing
  515.                 % (self.alias, self._thread_ident, thread.get_ident()))

Exception Type: DatabaseError at /admin/auth/user/
Exception Value: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 140735171056384 and this is thread id 4440478576.
@cancan101
Copy link
Contributor

What does this entail?

@miki725
Copy link
Owner Author

miki725 commented Jan 26, 2015

just updated description with a sample traceback

However I dont think I will be looking into this. Will probably stop Django support for this library django<1.7

Of course contributions are welcome to add support for 1.7.

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

No branches or pull requests

2 participants