1
TypeError at /evaluate/
expected string or bytes-like object
Request Method: POST
Request URL:
Django Version: 3.2
Exception Type: TypeError
Exception Value:    
expected string or bytes-like object
Exception Location: C:\Users\mrtha\AppData\Local\Programs\Python\Python37\lib\re.py, line 194, in sub
Python Executable:  C:\Users\mrtha\AppData\Local\Programs\Python\Python37\python.exe
Python Version: 3.7.8
Python Path:    
['D:\\answerEvaluator\\answerEvaluator',
 'C:\\Users\\mrtha\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip',
 'C:\\Users\\mrtha\\AppData\\Local\\Programs\\Python\\Python37\\DLLs',
 'C:\\Users\\mrtha\\AppData\\Local\\Programs\\Python\\Python37\\lib',
 'C:\\Users\\mrtha\\AppData\\Local\\Programs\\Python\\Python37',
 'C:\\Users\\mrtha\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages']
Server time:    Sun, 25 Apr 2021 08:05:01 +0000
Traceback Switch to copy-and-paste view
C:\Users\mrtha\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\exception.py, line 47, in inner
                response = get_response(request) …
▶ Local vars
C:\Users\mrtha\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\base.py, line 181, in _get_response
                response = wrapped_callback(request, *callback_args, **callback_kwargs) …
▶ Local vars
D:\answerEvaluator\answerEvaluator\evaluatorApp\views.py, line 116, in evaluateView
        answer  = re.sub('[^a-zA-Z0-9\s]', '', answer) …
▶ Local vars
C:\Users\mrtha\AppData\Local\Programs\Python\Python37\lib\re.py, line 194, in sub
    return _compile(pattern, flags).sub(repl, string, count) …
▶ Local vars
4

0 回答 0