Closed egaganas closed 4 years ago
L’erreur persiste.
——
DataError at /inscription/register/
value too long for type character varying(10)
Request Method: POST
Request URL: https://cadcours.alwaysdata.net/inscription/register/
Django Version: 3.0.7
Exception Type: DataError
Exception Value:
value too long for type character varying(10)
Exception Location: /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in _execute, line 86
Python Executable: /usr/alwaysdata/uwsgi/2.0.18/bin/uwsgi
Python Version: 3.7.2
Python Path:
['.',
'',
'/usr/alwaysdata/python/3.7.2/lib/python37.zip',
'/usr/alwaysdata/python/3.7.2/lib/python3.7',
'/usr/alwaysdata/python/3.7.2/lib/python3.7/lib-dynload',
'/home/cadcours/.local/lib/python3.7/site-packages',
'/usr/alwaysdata/python/3.7.2/lib/python3.7/site-packages']
Server time: mer, 15 Jul 2020 14:54:53 +0200
Traceback Switch to copy-and-paste view
/home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars The above exception (value too long for type character varying(10) ) was the direct cause of the following exception: /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/exception.py in inner response = get_response(request) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = self.process_exception_by_middleware(e, request) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) … ▶ Local vars ./inscription/views.py in registerBase profile.save() … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/base.py in save force_update=force_update, update_fields=update_fields) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/base.py in save_base force_update, using, update_fields, … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/base.py in _save_table results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/base.py in _do_insert using=using, raw=raw, … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/manager.py in manager_method return getattr(self.get_queryset(), name)(args, **kwargs) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/query.py in _insert return query.get_compiler(using=using).execute_sql(returning_fields) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py in execute_sql cursor.execute(sql, params) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in execute return super().execute(sql, params) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in _execute_with_wrappers return executor(sql, params, many, context) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/utils.py in exit raise dj_exc_value.with_traceback(traceback) from exc_value … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars Request information
USER
AnonymousUser
GET
No GET data
POST
Variable Value
csrfmiddlewaretoken
'H47n5rZHS5zSPnrjwmKezv4TrMS6pp4y9meeCjPOCA2ROCDvW52XYLx0cpnMCzec'
accountType
'Coach'
firstName
'Edwin'
lastName
'Fisher'
passwd
'Salamandre11.'
passwordConf
'Salamandre11.'
birthday
'4/1/88'
NationalRegisterNumber
'2'
Address
'Bah '
mailAddress
'edwingl12@outlook.com'
PhoneNumber
'08788888888'
Course_Maths
'GivesMaths'
Course_Chimie
'GivesChimie'
coachSchool
'Bah '
schoolLevel
'high'
Frenchlevel
'5'
Dutchlevel
'3'
IBAN
'J’invite '
FILES
No FILES data
COOKIES
Variable Value
csrftoken
'ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz'
sessionid
'zdy19y4lopmkfn0ym2nmsq40nlu0vml4'
META
Variable Value
CONTENT_LENGTH
'434'
CONTENT_TYPE
'application/x-www-form-urlencoded'
CSRF_COOKIE
'ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'
HTTP_ACCEPT_ENCODING
'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE
'en-us'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
('csrftoken=ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz; '
'sessionid=zdy19y4lopmkfn0ym2nmsq40nlu0vml4')
HTTP_HOST
'cadcours.alwaysdata.net'
HTTP_ORIGIN
'https://cadcours.alwaysdata.net'
HTTP_REFERER
'https://cadcours.alwaysdata.net/inscription/coach/'
HTTP_USER_AGENT
('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, '
'like Gecko) Version/13.1.1 Safari/605.1.15')
HTTP_VIA
'1.1 alproxy'
HTTP_X_FORWARDED_PROTO
'https'
HTTP_X_REAL_IP
'94.109.98.234'
HTTP_X_SSL
'1'
HTTP_X_SSL_CLIENT_VERIFY
'NONE'
PATH_INFO
'/inscription/register/'
QUERY_STRING
''
REMOTE_ADDR
'94.109.98.234'
REQUEST_METHOD
'POST'
REQUEST_URI
'/inscription/register/'
SCRIPT_NAME
''
SERVER_NAME
'http8'
SERVER_PORT
'8100'
SERVER_PROTOCOL
'HTTP/1.1'
uwsgi.node
b'http8'
uwsgi.version
b'2.0.18'
wsgi.errors
@egaganas Je n'arrive pas à reproduire l'erreur. Chez moi tout se passe bien...
(P.S. pour la suite, un screenshot du début de l'erreur suffit et est plus lisible que de tout copier coller :smile: )
MultiValueDictKeyError at /inscription/register/ 'lastName' Request Method: GET Request URL: http://cadcours.alwaysdata.net/inscription/register/ Django Version: 3.0.7 Exception Type: MultiValueDictKeyError Exception Value:
'lastName' Exception Location: /home/cadcours/.local/lib/python3.7/site-packages/django/utils/datastructures.py in getitem, line 78 Python Executable: /usr/alwaysdata/uwsgi/2.0.18/bin/uwsgi Python Version: 3.7.2 Python Path:
['.', '', '/usr/alwaysdata/python/3.7.2/lib/python37.zip', '/usr/alwaysdata/python/3.7.2/lib/python3.7', '/usr/alwaysdata/python/3.7.2/lib/python3.7/lib-dynload', '/home/cadcours/.local/lib/python3.7/site-packages', '/usr/alwaysdata/python/3.7.2/lib/python3.7/site-packages'] Server time: dim, 12 Jul 2020 20:09:16 +0200 Traceback Switch to copy-and-paste view
/home/cadcours/.local/lib/python3.7/site-packages/django/utils/datastructures.py in getitem list = super().getitem(key) … ▶ Local vars During handling of the above exception ('lastName'), another exception occurred: ./inscription/views.py in registerBase username = form["lastName"] + "" + form['firstName'] … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/utils/datastructures.py in getitem raise MultiValueDictKeyError(key) … ▶ Local vars During handling of the above exception ('lastName'), another exception occurred: /home/cadcours/.local/lib/python3.7/site-packages/django/utils/datastructures.py in getitem list_ = super().getitem(key) … ▶ Local vars During handling of the above exception ('lastName'), another exception occurred: /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/exception.py in inner response = get_response(request) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = self.process_exception_by_middleware(e, request) … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = wrapped_callback(request, *callback_args, **callbackkwargs) … ▶ Local vars ./inscription/views.py in registerBase username = form["lastName"] + "" + form['firstName'] … ▶ Local vars /home/cadcours/.local/lib/python3.7/site-packages/django/utils/datastructures.py in getitem raise MultiValueDictKeyError(key) … ▶ Local vars Request information
USER AnonymousUser GET No GET data POST No POST data FILES No FILES data COOKIES Variable Value csrftoken
<_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> wsgi.input'ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz' sessionid
'zdy19y4lopmkfn0ym2nmsq40nlu0vml4' META Variable Value CSRF_COOKIE 'ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' HTTP_ACCEPT_ENCODING
'gzip, deflate' HTTP_ACCEPT_LANGUAGE
'en-us' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE ('csrftoken=ZDcU7MbWDl5gBTBzK6QI6BpFASBbgxHVrVjLEE13nQyfA8NLaP8rvRSMlv6RtHRz; ' 'sessionid=zdy19y4lopmkfn0ym2nmsq40nlu0vml4') HTTP_HOST
'cadcours.alwaysdata.net' HTTP_ORIGIN 'http://cadcours.alwaysdata.net' HTTP_REFERER
'http://cadcours.alwaysdata.net/inscription/coach/' HTTP_UPGRADE_INSECURE_REQUESTS
'1' HTTP_USER_AGENT ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.1.1 Safari/605.1.15') HTTP_VIA
'1.1 alproxy' HTTP_X_REAL_IP
'94.109.102.22' PATH_INFO
'/inscription/register/' QUERY_STRING
'' REMOTE_ADDR '94.109.102.22' REQUEST_METHOD
'GET' REQUEST_URI '/inscription/register/' SCRIPT_NAME '' SERVER_NAME 'http8' SERVER_PORT '8100' SERVER_PROTOCOL 'HTTP/1.1' uwsgi.node
b'http8' uwsgi.version
b'2.0.18' wsgi.errors