Server error due to invalid integer value in form.

Issue #152 resolved
Randle Taylor repo owner created an issue

{{{ #!python

Traceback (most recent call last):

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\core\handlers\base.py", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\views\generic\base.py", line 48, in view return self.dispatch(request, args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\views\generic\base.py", line 69, in dispatch return handler(request, args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\views\generic\edit.py", line 172, in post return super(BaseCreateView, self).post(request, args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\views\generic\edit.py", line 138, in post return self.form_valid(form)

File "c:\deploy\qatrackplus\qatrack\qa\views.py", line 550, in form_valid status = models.TestInstanceStatus.objects.get(pk=val)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\manager.py", line 131, in get return self.get_query_set().get(args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\query.py", line 358, in get clone = self.filter(args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\query.py", line 621, in filter return self._filter_or_exclude(False, args, *kwargs)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\query.py", line 639, in _filter_or_exclude clone.query.add_q(Q(args, *kwargs))

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\sql\query.py", line 1250, in add_q can_reuse=used_aliases, force_having=force_having)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\sql\query.py", line 1185, in add_filter connector)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\sql\where.py", line 69, in add value = obj.prepare(lookup_type, value)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\sql\where.py", line 320, in prepare return self.field.get_prep_lookup(lookup_type, value)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\fields__init__.py", line 310, in get_prep_lookup return self.get_prep_value(value)

File "c:\deploy\virtualenvs\qatrackplus\lib\site-packages\django\db\models\fields__init__.py", line 537, in get_prep_value return int(value)

ValueError: invalid literal for int() with base 10: ''

<WSGIRequest path:/qatrack/qa/utc/perform/45/, GET:<QueryDict: {u'day': [u'next']}>, POST:<QueryDict: {u'form-19-value': [u'102.4'], u'form-29-comment': [u''], u'form-26-value': [u'1'], u'form-11-value': [u'1'], u'form-21-value': [u'100.2'], u'form-9-value': [u'1'], u'form-19-comment': [u''], u'form-0-comment': [u''], u'form-8-value': [u'1'], u'form-29-value': [u'1'], u'form-39-comment': [u''], u'form-MAX_NUM_FORMS': [u''], u'form-TOTAL_FORMS': [u'40'], u'form-38-comment': [u''], u'form-5-value': [u'1'], u'form-11-comment': [u''], u'form-37-value': [u'1'], u'form-2-comment': [u''], u'form-23-value': [u'99.1'], u'form-21-comment': [u''], u'form-13-comment': [u''], u'form-0-value': [u'1'], u'form-31-comment': [u''], u'form-4-value': [u'1'], u'form-22-comment': [u''], u'form-3-value': [u'1'], u'form-13-value': [u'1'], u'form-18-comment': [u''], u'form-10-comment': [u''], u'form-16-value': [u'-0.4'], u'form-28-comment': [u''], u'form-14-comment': [u''], u'form-16-comment': [u''], u'form-18-value': [u'0.2'], u'form-27-value': [u'1'], u'form-1-comment': [u''], u'form-12-value': [u'1'], u'comment': [u''], u'form-15-comment': [u''], u'form-14-value': [u'0.2'], u'form-10-value': [u'1'], u'form-7-comment': [u''], u'form-37-comment': [u''], u'form-9-comment': [u''], u'form-26-comment': [u''], u'form-38-value': [u'1'], u'form-35-comment': [u''], u'form-20-value': [u'100'], u'form-39-value': [u'1'], u'form-24-value': [u'2.2'], u'form-35-value': [u'1'], u'form-36-comment': [u''], u'form-27-comment': [u''], u'form-INITIAL_FORMS': [u'40'], u'form-30-value': [u'1'], u'form-22-value': [u'98.8'], u'form-32-comment': [u''], u'form-1-value': [u'1'], u'form-7-value': [u'1'], u'form-28-value': [u'1'], u'form-30-comment': [u''], u'form-17-value': [u'0.1'], u'form-15-value': [u'-0.2'], u'work_started': [u'07-09-2012 14:30'], u'form-34-value': [u'1'], u'form-12-comment': [u''], u'form-8-comment': [u''], u'form-23-comment': [u''], u'form-25-value': [u'902.2'], u'form-33-comment': [u''], u'form-20-comment': [u''], u'form-32-value': [u'1'], u'form-36-value': [u'1'], u'form-25-comment': [u''], u'form-6-comment': [u''], u'csrfmiddlewaretoken': [u's2HoHNZ000WQuQOrOR9BpVlFlFmferyU'], u'form-6-value': [u'1'], u'status': [u''], u'work_completed': [u''], u'form-24-comment': [u''], u'form-5-comment': [u''], u'form-2-value': [u'1'], u'form-3-comment': [u''], u'form-31-value': [u'1'], u'form-33-value': [u'1'], u'form-4-comment': [u''], u'form-17-comment': [u''], u'form-34-comment': [u'']}>, COOKIES:{'csrftoken': 's2HoHNZ000WQuQOrOR9BpVlFlFmferyU', 'sessionid': '510e37c74a1df933be498532915fffed'}, META:{'ACTUAL_SERVER_PROTOCOL': 'HTTP/1.1', 'CONTENT_LENGTH': '1513', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CSRF_COOKIE': 's2HoHNZ000WQuQOrOR9BpVlFlFmferyU', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'sessionid=510e37c74a1df933be498532915fffed; csrftoken=s2HoHNZ000WQuQOrOR9BpVlFlFmferyU', 'HTTP_HOST': 'localhost:8080', 'HTTP_MAX_FORWARDS': '10', 'HTTP_ORIGIN': 'http://ohqatrackdb01', 'HTTP_REFERER': 'http://ohqatrackdb01/qatrack/qa/utc/perform/45/?day=next', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1', 'HTTP_X_ARR_LOG_ID': '58568e4b-4ef0-45e0-8c19-320be1a6e13b', 'HTTP_X_FORWARDED_FOR': '10.68.196.104:4446', 'HTTP_X_ORIGINAL_URL': '/qatrack/qa/utc/perform/45/?day=next', 'PATH_INFO': u'/qa/utc/perform/45/', 'QUERY_STRING': 'day=next', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '63396', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/qa/utc/perform/45/?day=next', 'SCRIPT_NAME': u'/qatrack', 'SERVER_NAME': '127.0.0.1', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'CherryPy/3.2.2 Server', 'wsgi.errors': <open file 'C:/deploy/qatrackplus/logs\std_err.log', mode 'a' at 0x01778288>, 'wsgi.input': <cherrypy.wsgiserver.wsgiserver2.KnownLengthRFile object at 0x05DDC9D0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>

}}}

Comments (4)

  1. Log in to comment