[GH-ISSUE #158] User has no userattributes #108

Open
opened 2026-02-27 15:57:21 +03:00 by kerem · 3 comments
Owner

Originally created by @endeav0r on GitHub (Jul 2, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/158

After creating an instance, when I click on the name of the instance and try to view details I get the following error:

Environment:


Request Method: GET
Request URL: http://192.168.10.20:80/instance/2/kubernetes/

Django Version: 1.8.11
Python Version: 2.7.13
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'computes',
 'console',
 'networks',
 'storages',
 'interfaces',
 'instances',
 'secrets',
 'logs',
 'accounts',
 'create',
 'datasource')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.RemoteUserMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/srv/webvirtcloud/instances/views.py" in instance
  339.         user_quota_msg = check_user_quota(0, 0, 0, 0)
File "/srv/webvirtcloud/instances/views.py" in check_user_quota
  266.         ua = request.user.userattributes
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/utils/functional.py" in inner
  226.         return func(self._wrapped, *args)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__
  480.                     self.related.get_accessor_name()

Exception Type: RelatedObjectDoesNotExist at /instance/2/kubernetes/
Exception Value: User has no userattributes.

Originally created by @endeav0r on GitHub (Jul 2, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/158 After creating an instance, when I click on the name of the instance and try to view details I get the following error: ``` Environment: Request Method: GET Request URL: http://192.168.10.20:80/instance/2/kubernetes/ Django Version: 1.8.11 Python Version: 2.7.13 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'computes', 'console', 'networks', 'storages', 'interfaces', 'instances', 'secrets', 'logs', 'accounts', 'create', 'datasource') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.RemoteUserMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware') Traceback: File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 22. return view_func(request, *args, **kwargs) File "/srv/webvirtcloud/instances/views.py" in instance 339. user_quota_msg = check_user_quota(0, 0, 0, 0) File "/srv/webvirtcloud/instances/views.py" in check_user_quota 266. ua = request.user.userattributes File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/utils/functional.py" in inner 226. return func(self._wrapped, *args) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__ 480. self.related.get_accessor_name() Exception Type: RelatedObjectDoesNotExist at /instance/2/kubernetes/ Exception Value: User has no userattributes. ```
Author
Owner

@lu1as commented on GitHub (Jul 12, 2018):

I have the same problem with the admin user. With a created superuser account everything works fine.

<!-- gh-comment-id:404600770 --> @lu1as commented on GitHub (Jul 12, 2018): I have the same problem with the admin user. With a created superuser account everything works fine.
Author
Owner

@lord-kyron commented on GitHub (Jul 13, 2018):

Did you guys pulled the latest changes from the repo?
Those issues were fixed in the latest push.

<!-- gh-comment-id:404766656 --> @lord-kyron commented on GitHub (Jul 13, 2018): Did you guys pulled the latest changes from the repo? Those issues were fixed in the latest push.
Author
Owner

@shinebayar-g commented on GitHub (Nov 6, 2019):

I've just installed fresh webvirtcloud and seeing exact same error. as @lu1as said created new admin user and everything works fine now.

@lord-kyron looks like it's not.

<!-- gh-comment-id:550446509 --> @shinebayar-g commented on GitHub (Nov 6, 2019): I've just installed fresh webvirtcloud and seeing exact same error. as @lu1as said created new admin user and everything works fine now. @lord-kyron looks like it's not.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#108
No description provided.