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

Not JSON serializable #23

Open
apdavison opened this issue Nov 28, 2018 · 1 comment
Open

Not JSON serializable #23

apdavison opened this issue Nov 28, 2018 · 1 comment

Comments

@apdavison
Copy link
Contributor

With this file: https://web.gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/plexon/File_plexon_1.plx

we get the error

Traceback (most recent call last):
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/rest_framework/views.py", line 495, in dispatch
    response = self.handle_exception(exc)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/rest_framework/views.py", line 455, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/rest_framework/views.py", line 492, in dispatch
    response = handler(request, *args, **kwargs)
  File "/Users/andrew/dev/analysis/neural-activity-visualizer/neural_activity_app/app/views.py", line 72, in get
    return JsonResponse(block_data)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/http/response.py", line 530, in __init__
    data = json.dumps(data, cls=encoder, **json_dumps_params)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/json/__init__.py", line 251, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/site-packages/django/core/serializers/json.py", line 124, in default
    return super(DjangoJSONEncoder, self).default(o)
  File "/Users/andrew/anaconda/envs/visualizer/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: 101 is not JSON serializable
@apdavison
Copy link
Contributor Author

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