djangophotologue

Django-Photologue : Error 500 while uploading jpg files but uploading png files works


When I try to add jpg files in django-photologue I get "Server Error (500)".

The apache logs show :

"POST /admin/photologue/photo/add/ HTTP/1.1" 500 330 http://www.mywebsite.net/admin/photologue/photo/add/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36"

The file is actually uploaded to the media folder on the server but it doesn't show in the admin interface and I cannot add it to a gallery.

Also adding png files works just fine.

Any suggestions please?

EDIT: When I enable django's debug I get

Exception Type: UnsupportedOperation Exception Value: fileno Exception Location: /usr/local/lib/python2.7/dist-packages/photologue/models.py in create_size, line 455 –


Solution

  • The issue was due to the version of Django I was using (1.6). I updated to the latest Django release and it fixed the problem.