Определенная переменная, говорит, что нет 'n1', ключ - PullRequest
0 голосов
/ 04 ноября 2019
MultiValueDictKeyError at /home/

'n1'

Request Method:     GET
Request URL:    http://127.0.0.1:8000/home/
Django Version:     2.2.6
Exception Type:     MultiValueDictKeyError
Exception Value:    

'n1'

Exception Location:     /home/sanzu/anaconda3/lib/python3.7/site-packages/django/utils/datastructures.py in __getitem__, line 80
Python Executable:  /home/sanzu/anaconda3/bin/python
Python Version:     3.7.3
Python Path:    

['/home/sanzu/PycharmProjects/django_site',
 '/home/sanzu/anaconda3/lib/python37.zip',
 '/home/sanzu/anaconda3/lib/python3.7',
 '/home/sanzu/anaconda3/lib/python3.7/lib-dynload',
 '/home/sanzu/anaconda3/lib/python3.7/site-packages']

Server time:    Mon, 4 Nov 2019 18:29:40 +0000
Traceback Switch to copy-and-paste view

    /home/sanzu/anaconda3/lib/python3.7/site-packages/django/utils/datastructures.py in __getitem__

                    list_ = super().__getitem__(key)

         …
    ▼ Local vars
    Variable    Value
    __class__   

    <class 'django.utils.datastructures.MultiValueDict'>

    key     

    'n1'

    self    

    <QueryDict: {}>

    During handling of the above exception ('n1'), another exception occurred:
    /home/sanzu/anaconda3/lib/python3.7/site-packages/django/core/handlers/exception.py in inner

                    response = get_response(request)

         …
    ▼ Local vars
    Variable    Value
    exc     

    MultiValueDictKeyError('n1')

    get_response    

    <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f2e177ac208>>

    request     

    <WSGIRequest: GET '/home/'>

    /home/sanzu/anaconda3/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response

                        response = self.process_exception_by_middleware(e, request)

         …
    ▼ Local vars
    Variable    Value
    callback    

    <function page at 0x7f2e16974048>

    callback_args   

    ()

    callback_kwargs     

    {}

    middleware_method   

    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f2e1687c080>>

    request     

    <WSGIRequest: GET '/home/'>

    resolver    

    <URLResolver 'django_site.urls' (None:None) '^/'>

    resolver_match  

    ResolverMatch(func=san.views.page, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[], route=home/)

    response    

    None

    self    

    <django.core.handlers.wsgi.WSGIHandler object at 0x7f2e177ac208>

    wrapped_callback    

    <function page at 0x7f2e16974048>

    /home/sanzu/anaconda3/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response

                        response = wrapped_callback(request, *callback_args, **callback_kwargs)

         …
    ▼ Local vars
    Variable    Value
    callback    

    <function page at 0x7f2e16974048>

    callback_args   

    ()

    callback_kwargs     

    {}

    middleware_method   

    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f2e1687c080>>

    request     

    <WSGIRequest: GET '/home/'>

    resolver    

    <URLResolver 'django_site.urls' (None:None) '^/'>

    resolver_match  

    ResolverMatch(func=san.views.page, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[], route=home/)

    response    

    None

    self    

    <django.core.handlers.wsgi.WSGIHandler object at 0x7f2e177ac208>

    wrapped_callback    

    <function page at 0x7f2e16974048>

    /home/sanzu/PycharmProjects/django_site/san/views.py in page

            a = int(request.GET['n1'])

         …
    ▼ Local vars
    Variable    Value
    request     

    <WSGIRequest: GET '/home/'>

    /home/sanzu/anaconda3/lib/python3.7/site-packages/django/utils/datastructures.py in __getitem__

                    raise MultiValueDictKeyError(key)

         …
    ▼ Local vars
    Variable    Value
    __class__   

    <class 'django.utils.datastructures.MultiValueDict'>

    key     

    'n1'

    self    

    <QueryDict: {}>

Request information
USER

anaya
GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES
Variable    Value
csrftoken   

'SPKPyjUnT0DRJZJX6qQGEqqDl5XvJzKwBtM92V8c7AUJRsYatV5czsjjxL7NEkLi'

sessionid   

'ekdp3pxloxkx9wass8psna2vvd8gsqtl'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...