I am trying to drag and drop an image, but there's an IndexError in djangocms_text_ckeditor/html.py. It seems mime_type always = u'', so mime_type.split("/")[1] gives an error.
It happens both in localhost, with development server, and production, with apache and wsgi.
Traceback:
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
response = view_func(request, _args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
response = view_func(request, _args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
return view(request, _args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/views/decorators/clickjacking.py" in wrapped_view
resp = view_func(_args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/reversion/revisions.py" in do_revision_context
return func(_args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/cms/admin/pageadmin.py" in edit_plugin
response = plugin_admin.add_view(request)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
return bound_func(_args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
response = view_func(request, _args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
return func(self, _args2, *_kwargs2)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
return func(_args, *_kwargs)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
self.save_model(request, new_object, form, False)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/djangocms_text_ckeditor/cms_plugins.py" in save_model
super(TextPlugin, self).save_model(request, obj, form, change)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/cms/plugin_base.py" in save_model
return super(CMSPluginBase, self).save_model(request, obj, form, change)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in save_model
obj.save()
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/djangocms_text_ckeditor/models.py" in save
body = extract_images(body, self)
File "/home/roberto/.virtualenvs/ve_master/local/lib/python2.7/site-packages/djangocms_text_ckeditor/html.py" in extract_images
image_type = mime_type.split("/")[1]
Exception Type: IndexError at /en/admin/cms/page/1/edit-plugin/172/
Exception Value: list index out of range
I am using the following environment in my local machine:
Django - 1.5.4 - active
PIL - 1.1.7 - active
Pillow - 2.2.1 - active
Pygments - 1.6 - active
Python - 2.7.3 - active development (/usr/lib/python2.7/lib-dynload)
South - 0.8.2 - active
argparse - 1.2.1 - active development (/usr/lib/python2.7)
bpython - 0.12 - active
cmsplugin-news - 0.4.2 - active
django-ckeditor - 4.0.2 - active
django-classy-tags - 0.4 - active
django-cms - 2.4.2 - active
django-country-dialcode - 0.4.8 - active
django-extensions - 1.2.2 - active
django-guardian - 1.1.1 - active
django-modeltranslation - 0.6.1 - active
django-mptt - 0.5.2 - active
django-reusableapps - 0.1.1 - active
django-reversion - 1.7.1 - active
django-sekizai - 0.7 - active
djangocms-text-ckeditor - 1.0.10 - active
html5lib - 1.0b3 - active
pip - 1.2.1 - active
psycopg2 - 2.5.1 - active
python-ldap - 2.4.13 - active
python-magic - 0.4.6 - active
pytz - 2013.7 - active
setuptools - 0.6c11 - active
six - 1.4.1 - active
switch2bill-common - 2.8.1 - active
wsgiref - 0.1.2 - active development (/usr/lib/python2.7)
yolk - 0.4.3 - active
Hi.
I am trying to drag and drop an image, but there's an IndexError in djangocms_text_ckeditor/html.py. It seems mime_type always = u'', so mime_type.split("/")[1] gives an error.
It happens both in localhost, with development server, and production, with apache and wsgi.
I am using the following environment in my local machine: