[GH-ISSUE #135] RelatedObjectDoesNotExist at /instance/2/inetlab-w7cli/ User has no userattributes. #89

Closed
opened 2026-02-27 15:57:17 +03:00 by kerem · 5 comments
Owner

Originally created by @ssbaksa on GitHub (May 2, 2017).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/135

I have two servers (Ubuntu 16.04) running WebvirtCloud. On older one all works as expected but on newly installed one with latest WebvirtClud software I get this error when I try to access any of my virtual servers. Each server have an instance of WVC and is connected to libvirts on both of them.

Environment:

Request Method: GET
Request URL: http://192.168.252.162:80/instance/2/inetlab-w7cli/

Django Version: 1.8.11
Python Version: 2.7.12
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')
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
307. user_quota_msg = check_user_quota(0, 0, 0, 0)
File "/srv/webvirtcloud/instances/views.py" in check_user_quota
249. 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/inetlab-w7cli/
Exception Value: User has no userattributes.

Originally created by @ssbaksa on GitHub (May 2, 2017). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/135 I have two servers (Ubuntu 16.04) running WebvirtCloud. On older one all works as expected but on newly installed one with latest WebvirtClud software I get this error when I try to access any of my virtual servers. Each server have an instance of WVC and is connected to libvirts on both of them. Environment: Request Method: GET Request URL: http://192.168.252.162:80/instance/2/inetlab-w7cli/ Django Version: 1.8.11 Python Version: 2.7.12 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') 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 307. user_quota_msg = check_user_quota(0, 0, 0, 0) File "/srv/webvirtcloud/instances/views.py" in check_user_quota 249. 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/inetlab-w7cli/ Exception Value: User has no userattributes.
kerem closed this issue 2026-02-27 15:57:17 +03:00
Author
Owner

@ahromis commented on GitHub (May 27, 2017):

I'm also seeing similar behavior, running on Ubuntu 17.04 and latest webvirtcloud master.

Environment:


Request Method: GET
Request URL: http://10.0.0.5:8000/instance/1/test2/

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')
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 "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/usr/share/webapps/webvirtcloud/instances/views.py" in instance
  307.         user_quota_msg = check_user_quota(0, 0, 0, 0)
File "/usr/share/webapps/webvirtcloud/instances/views.py" in check_user_quota
  249.         ua = request.user.userattributes
File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/utils/functional.py" in inner
  226.         return func(self._wrapped, *args)
File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__
  480.                     self.related.get_accessor_name()

Exception Type: RelatedObjectDoesNotExist at /instance/1/test2/
Exception Value: User has no userattributes.

<!-- gh-comment-id:304425068 --> @ahromis commented on GitHub (May 27, 2017): I'm also seeing similar behavior, running on Ubuntu 17.04 and latest webvirtcloud master. ``` Environment: Request Method: GET Request URL: http://10.0.0.5:8000/instance/1/test2/ 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') 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 "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 22. return view_func(request, *args, **kwargs) File "/usr/share/webapps/webvirtcloud/instances/views.py" in instance 307. user_quota_msg = check_user_quota(0, 0, 0, 0) File "/usr/share/webapps/webvirtcloud/instances/views.py" in check_user_quota 249. ua = request.user.userattributes File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/utils/functional.py" in inner 226. return func(self._wrapped, *args) File "/usr/share/webapps/webvirtcloud/venv/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__ 480. self.related.get_accessor_name() Exception Type: RelatedObjectDoesNotExist at /instance/1/test2/ Exception Value: User has no userattributes. ```
Author
Owner

@ahromis commented on GitHub (May 27, 2017):

It seems to work without issue when a user is created though. Just when using the admin user I get this error.

<!-- gh-comment-id:304425395 --> @ahromis commented on GitHub (May 27, 2017): It seems to work without issue when a user is created though. Just when using the admin user I get this error.
Author
Owner

@cholletk commented on GitHub (May 27, 2017):

I can solve this issue on my side by editing the admin user and login again (going trough the users tab and not Profile menu).

<!-- gh-comment-id:304442013 --> @cholletk commented on GitHub (May 27, 2017): I can solve this issue on my side by editing the admin user and login again (going trough the users tab and not Profile menu).
Author
Owner

@zxing0214 commented on GitHub (Jun 5, 2017):

I'm also seeing similar behavior, running on Ubuntu 16.04 and latest webvirtcloud master.

<!-- gh-comment-id:306126789 --> @zxing0214 commented on GitHub (Jun 5, 2017): I'm also seeing similar behavior, running on Ubuntu 16.04 and latest webvirtcloud master.
Author
Owner

@lsascha commented on GitHub (Jun 15, 2018):

Had the same issue, edited Admin user using users tab without changing the password. got another error and now my password does no longer work. 😳

<!-- gh-comment-id:397559802 --> @lsascha commented on GitHub (Jun 15, 2018): Had the same issue, edited Admin user using users tab without changing the password. got another error and now my password does no longer work. 😳
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#89
No description provided.