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

Float not allowed on node update #99

Closed
troeger opened this issue Jun 8, 2016 · 1 comment
Closed

Float not allowed on node update #99

troeger opened this issue Jun 8, 2016 · 1 comment

Comments

@troeger
Copy link
Owner

troeger commented Jun 8, 2016

Internal Server Error: /api/front/graphs/1457
Traceback (most recent call last):
File "/var/www/fuzzed/www/FuzzEd/api/common.py", line 275, in wrapper
response = callback(request, _args, *_kwargs)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 442, in dispatch_detail
return self.dispatch('detail', request, *_kwargs)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 465, in dispatch
response = method(request, *_kwargs)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 1325, in get_detail
return self.create_response(request, bundle)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 1202, in create_response
serialized = self.serialize(request, data, desired_format)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 371, in serialize
return self.meta.serializer.serialize(data, format, options)
File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/serializers.py", line 202, in serialize
serialized = getattr(self, "to
%s" % desired_format)(bundle, options)
File "/var/www/fuzzed/www/FuzzEd/api/frontend.py", line 547, in to_json
return data.obj.to_json(use_value_dict=True)
File "/var/www/fuzzed/www/FuzzEd/models/graph.py", line 106, in to_json
return json.dumps(self.to_dict(use_value_dict))
File "/var/www/fuzzed/www/FuzzEd/models/graph.py", line 120, in to_dict
nodes = [node.to_dict(use_value_dict) for node in node_set]
File "/var/www/fuzzed/www/FuzzEd/models/node.py", line 150, in to_dict
deleted=False)}
File "/var/www/fuzzed/www/FuzzEd/models/node.py", line 149, in
'value': prop.get_value()} for prop in self.properties.filter(
File "/var/www/fuzzed/www/FuzzEd/models/properties.py", line 133, in get_value
return int(val)
ValueError: invalid literal for int() with base 10: '0.001'

Request repr():
<WSGIRequest
path:/api/front/graphs/1457,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'_ga': 'GA1.2.1199590973.1462569714',
'_gat': '1',
'csrftoken': 'WklZgs9Qony5iuTuLl9fNcl49S7BLLw1',
'sessionid': 'scebscnggvnhf29s6zjt3vac3r3ey3v4'},
META:{'CONTEXT_DOCUMENT_ROOT': '/var/www/fuzzed/www',
'CONTEXT_PREFIX': '',
u'CSRF_COOKIE': u'WklZgs9Qony5iuTuLl9fNcl49S7BLLw1',
'DOCUMENT_ROOT': '/var/www/fuzzed/www',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, /; q=0.01',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'pt-pt',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': '_ga=GA1.2.1199590973.1462569714; _gat=1; csrftoken=WklZgs9Qony5iuTuLl9fNcl49S7BLLw1; sessionid=scebscnggvnhf29s6zjt3vac3r3ey3v4',
'HTTP_DNT': '1',
'HTTP_HOST': 'fuzzed.org',
'HTTP_REFERER': 'https://fuzzed.org/editor/1457',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
'PATH_INFO': u'/api/front/graphs/1457',
'PATH_TRANSLATED': '/var/www/fuzzed/www/FuzzEd/wsgi.py/api/front/graphs/1457',
'QUERY_STRING': '',
'REMOTE_ADDR': '94.62.46.153',
'REMOTE_PORT': '55142',
'REQUEST_METHOD': 'GET',
'REQUEST_SCHEME': 'https',
'REQUEST_URI': '/api/front/graphs/1457',
'SCRIPT_FILENAME': '/var/www/fuzzed/www/FuzzEd/wsgi.py',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '37.200.99.207',
'SERVER_ADMIN': '[email protected]',
'SERVER_NAME': 'fuzzed.org',
'SERVER_PORT': '443',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '

Apache/2.4.7 (Ubuntu) Server at fuzzed.org Port 443\n',
'SERVER_SOFTWARE': 'Apache/2.4.7 (Ubuntu)',
'SSL_TLS_SNI': 'fuzzed.org',
'mod_wsgi.application_group': 'fuzzed.org|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.enable_sendfile': '0',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '443',
'mod_wsgi.process_group': 'fuzzed.org',
'mod_wsgi.queue_start': '1465343366412222',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 4),
'wsgi.errors': <mod_wsgi.Log object at 0xa70b83e0>,
'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xa70811d0>,
'wsgi.input': <mod_wsgi.Input object at 0xa70b8bd8>,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'https',
'wsgi.version': (1, 0)}>

@rakhimov
Copy link
Contributor

rakhimov commented Oct 1, 2017

Duplicate of #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants