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

Crash of GraphML export reported #102

Open
troeger opened this issue Sep 30, 2016 · 0 comments
Open

Crash of GraphML export reported #102

troeger opened this issue Sep 30, 2016 · 0 comments
Milestone

Comments

@troeger
Copy link
Owner

troeger commented Sep 30, 2016

The user sees HTTP error 500, this is happening in the backend:

Internal Server Error: /api/front/graphs/1485
Traceback (most recent call last):
 File "/var/www/fuzzed/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
   response = wrapped_callback(request, *callback_args, **callback_kwargs)
 File "/var/www/fuzzed/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
   return view_func(*args, **kwargs)
 File "/var/www/fuzzed/www/FuzzEd/api/common.py", line 345, in wrapper
   return self._handle_500(request, e)
 File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 289, in _handle_500
   return self.error_response(request, data, response_class=response_class)
 File "/var/www/fuzzed/venv/src/django-tastypie/tastypie/resources.py", line 1231, in error_response
   serialized = self.serialize(request, errors, 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/common.py", line 73, in to_graphml
   return data.obj.to_graphml()
AttributeError: 'dict' object has no attribute 'obj'_

It may be related to another exception floating in for the same graph, which relates to Unicode problems:

Internal Server Error: /api/front/graphs/1485
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/common.py", line 73, in to_graphml
   return data.obj.to_graphml()
 File "/var/www/fuzzed/www/FuzzEd/models/graph.py", line 163, in to_graphml
   [edge.to_graphml() for edge in self.edges.filter(deleted=False)] +
 File "/var/www/fuzzed/www/FuzzEd/models/node.py", line 180, in to_graphml
   self.properties_to_graphml() +
 File "/var/www/fuzzed/www/FuzzEd/models/node.py", line 205, in properties_to_graphml
   graphml.append(self.graphml_data_key(prop.key, prop.get_value()))
 File "/var/www/fuzzed/www/FuzzEd/models/node.py", line 210, in graphml_data_key
   return '            <data key="%s">%s</data>\n' % (key, str(value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 0: ordinal not in range(128)
@troeger troeger added this to the Next release milestone Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant