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

Error creating layer from admin console #274

Open
Famicoman opened this issue Mar 28, 2017 · 3 comments
Open

Error creating layer from admin console #274

Famicoman opened this issue Mar 28, 2017 · 3 comments

Comments

@Famicoman
Copy link
Contributor

In admin console as a superuser, go to add a layer because one is needed before I create a node. Whether I choose a marker or polygon, when I hit save it gives me a 500 internal server error.

I'm not a big python guy so I have no idea how to go about fixing this. Also, please let me know if there is another way to add layers.

Log from /var/www/nodeshot/log/nodeshot.error.log:

[ERROR 2017-03-28 21:04:22,466] module: base, process: 30476, thread: 140492076672896
Internal Server Error: /admin/layers/layer/add/
Traceback (most recent call last):
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 618, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 233, in inner
    return view(request, *args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/reversion/admin.py", line 172, in add_view
    return super(VersionAdmin, self).add_view(request, form_url, extra_context)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1518, in add_view
    return self.changeform_view(request, None, form_url, extra_context)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 34, in _wrapper
    return bound_func(*args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 30, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1469, in changeform_view
    self.save_model(request, new_object, form, not add)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1080, in save_model
    obj.save()
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/nodeshot/core/layers/models/layer.py", line 76, in save
    super(Layer, self).save(*args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/nodeshot/core/base/models.py", line 77, in save
    super(BaseDate, self).save(*args, **kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/models/base.py", line 771, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 189, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/nodeshot/community/participation/models/__init__.py", line 168, in create_layer_rating_settings
    create_related_object.delay(LayerParticipationSettings, {'layer': layer})
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/celery/app/task.py", line 412, in delay
    return self.apply_async(args, kwargs)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/celery/app/task.py", line 535, in apply_async
    **options
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/celery/app/base.py", line 737, in send_task
    amqp.send_task_message(P, name, message, **options)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/celery/app/amqp.py", line 558, in send_task_message
    **properties
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/messaging.py", line 169, in publish
    compression, headers)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/messaging.py", line 252, in _prepare
    body) = dumps(body, serializer=serializer)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
    payload = encoder(data)
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/serialization.py", line 54, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/serialization.py", line 50, in _reraise_errors
    yield
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
    payload = encoder(data)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/utils/json.py", line 72, in dumps
    **dict(default_kwargs, **kwargs))
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/simplejson/__init__.py", line 397, in dumps
    **kw).encode(obj)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/simplejson/encoder.py", line 291, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/simplejson/encoder.py", line 373, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/kombu/utils/json.py", line 62, in default
    return super(JSONEncoder, self).default(o)
  File "/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/simplejson/encoder.py", line 268, in default
    raise TypeError(repr(o) + " is not JSON serializable")
EncodeError: <class 'nodeshot.community.participation.models.layer_participation_settings.LayerParticipationSettings'> is not JSON serializable
@nemesifier
Copy link
Member

Are you adding the layer from the web interface?

@Famicoman
Copy link
Contributor Author

I'm adding the layer from the admin web interface.

@oxodi
Copy link

oxodi commented Jul 2, 2017

same error for me, how i fix it?

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

3 participants