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

Validation Error for views. ["'9' is not a valid UUID."] #11

Closed
itsmeabraham opened this issue Oct 19, 2019 · 1 comment
Closed

Validation Error for views. ["'9' is not a valid UUID."] #11

itsmeabraham opened this issue Oct 19, 2019 · 1 comment

Comments

@itsmeabraham
Copy link

Environment:

Request Method: GET
Request URL: http://localhost:8000/cartelera/4290D9

Django Version: 2.0.5
Python Version: 3.6.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.humanize',
'django.contrib.staticfiles',
'widget_tweaks',
'django_user_agents',
'tracking',
'tracking_analyzer',
'qr_code',
'catalogs',
'payments',
'movies',
'locations',
'tickets',
'clients',
'promotions',
'website',
'sellers',
'sellmin',
'webmin',
'blog',
'emails',
'cashiers']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django_user_agents.middleware.UserAgentMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/fields/init.py" in to_python
2363. return uuid.UUID(value)

File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/uuid.py" in init
137. hex = hex.replace('urn:', '').replace('uuid:', '')

During handling of the above exception ('int' object has no attribute 'replace'), another exception occurred:

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/views/generic/detail.py" in get
105. self.object = self.get_object()

File "/Users/am/devel/autocinema_webapp/src/website/modules/screenings/views.py" in get_object
45. Tracker.objects.create_from_request(self.request, object)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/tracking_analyzer/manager.py" in create_from_request
75. user=user

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
82. return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/query.py" in create
417. obj.save(force_insert=True, using=self.db)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/base.py" in save
729. force_update=force_update, update_fields=update_fields)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/base.py" in save_base
759. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/base.py" in _save_table
842. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/base.py" in _do_insert
880. using=using, raw=raw)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
82. return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/query.py" in _insert
1125. return query.get_compiler(using=using).execute_sql(return_id)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
1282. for sql, params in self.as_sql():

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in as_sql
1235. for obj in self.query.objs

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in
1235. for obj in self.query.objs

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in
1234. [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in prepare_value
1174. value = field.get_db_prep_save(value, connection=self.connection)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/fields/init.py" in get_db_prep_save
767. return self.get_db_prep_value(value, connection=connection, prepared=False)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/fields/init.py" in get_db_prep_value
2354. value = self.to_python(value)

File "/Users/am/devel/autocinema_webapp/var/venv/lib/python3.6/site-packages/django/db/models/fields/init.py" in to_python
2368. params={'value': value},

Exception Type: ValidationError at /cartelera/4290D9
Exception Value: ["'9' is not a valid UUID."]

@jose-lpa
Copy link
Owner

This should not be a problem in this package. Also, support for Django 2 has been added.

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