divio / aldryn-newsblog

A combined news/weblog application for Aldryn and django CMS – part of the Essential Addons.
https://marketplace.django-cms.org/en/addons/browse/aldryn-newsblog/
Other
67 stars 118 forks source link

Error while creating an article #411

Closed shannon-rodricks closed 8 years ago

shannon-rodricks commented 8 years ago

Hi, I've come across this error while making my app and despite much googling was unable to find a solution for it. Could anyone help me out with it?

File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response

  1. response = wrapped_callback(request, _callback_args, *_callback_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/contrib/admin/options.py" in wrapper
  2. return self.admin_site.admin_view(view)(_args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  3. response = view_func(request, _args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4. response = view_func(request, _args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/contrib/admin/sites.py" in inner
  5. return view(request, _args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/aldryn_newsblog/admin.py" in add_view
  6. return super(ArticleAdmin, self).add_view(request, _args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/reversion/admin.py" in add_view
  7. return super(VersionAdmin, self).add_view(request, form_url, extra_context) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/contrib/admin/options.py" in add_view
  8. return self.changeform_view(request, None, form_url, extra_context) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapper
  9. return bound_func(_args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  10. response = view_func(request, _args, *_kwargs) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/utils/decorators.py" in bound_func
  11. return func.get(self, type(self))(_args2, *_kwargs2) File "/usr/lib/python3.4/contextlib.py" in inner
  12. return func(_args, *_kwds) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/contrib/admin/options.py" in changeform_view
  13. if form.is_valid(): File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/forms/forms.py" in is_valid
  14. return self.is_bound and not self.errors File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/forms/forms.py" in errors
  15. self.full_clean() File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/forms/forms.py" in full_clean
  16. self._clean_fields() File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/django/forms/forms.py" in _clean_fields
  17. value = field.clean(value) File "/home/administrator/work/workspaces/web/dgenv/lib/python3.4/site-packages/sortedm2m/forms.py" in clean
  18. return [objects[force_text(val)] for val in value]

Exception Type: TypeError at /en/admin/aldryn_newsblog/article/add/ Exception Value: 'NoneType' object is not iterable

shannon-rodricks commented 8 years ago

My setup is Python 3.4 django-cms==3.3.0 aldryn-apphooks-config==0.2.7 aldryn-boilerplates==0.7.4 aldryn-categories==1.0.3 aldryn-common==1.0.3 aldryn-newsblog==1.2.2 aldryn-people==1.2.1 aldryn-reversion==1.0.9 aldryn-translation-tools==0.2.1 django-reversion==1.10.2 django-sortedm2m==1.3.0

shannon-rodricks commented 8 years ago

So apparently I didnt google enough. Its a known bug in sortedm2m version 1.3.0. Reverting to version 1.2.2 resolved it

mkoistinen commented 8 years ago

Thanks for reporting this, @shanrod220. We'll monitor the situation with sortedm2m and if another version isn't released soon, we'll pin the dependence to the earlier version.

mkoistinen commented 8 years ago

For reference, we have an issue reported to the sortedm2m project here: https://github.com/gregmuellegger/django-sortedm2m/issues/80