Opened 11 years ago

Closed 10 years ago

#789 closed defect (fixed)

Cannot upload ODF (LibreOffice, OpenOffice, etc.) files

Reported by: Bro666 Owned by:
Priority: major Milestone: 0.7.0
Component: programming Keywords: odf, pdf
Cc: Parent Tickets:

Description

System bombs with the follwing output in lazyserver:

Error: Unable to connect or start own listener. Aborting.
Error: May not be a PDF file (continuing anyway)
Error (12): Illegal character '{'
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
2013-10-03 05:08:46,569 ERROR   [mediagoblin.processing.task] An unhandled exception was raised while processing <MediaEntry 14: Layout for Linux Magazine Spain #94>
2013-10-03 05:08:46,570 WARNING [mediagoblin.processing] No idea what happened here, but it failed: KeyError('Page size',)
2013-10-03 05:08:46,605 WARNING [mediagoblin.processing] No idea what happened here, but it failed: KeyError('Page size',)
Error - <type 'exceptions.KeyError'>: 'Page size'
URL: http://192.168.1.108:6543/submit/
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/urlmap.py', line 203 in __call__
  return app(environ, start_response)
File '/var/www/mediagoblin/mediagoblin/app.py', line 259 in __call__
  return self.call_backend(environ, start_response)
File '/var/www/mediagoblin/mediagoblin/app.py', line 236 in call_backend
  response = controller(request)
File '/var/www/mediagoblin/mediagoblin/decorators.py', line 52 in new_controller_func
  return controller(request, *args, **kwargs)
File '/var/www/mediagoblin/mediagoblin/submit/views.py', line 145 in submit_start
  run_process_media(entry, feed_url)
File '/var/www/mediagoblin/mediagoblin/submit/lib.py', line 94 in run_process_media
  task_id=entry.queued_task_id)
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/celery-3.0.23-py2.7.egg/celery/app/task.py', line 463 in apply_async
  link=link, link_error=link_error, **options)
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/celery-3.0.23-py2.7.egg/celery/app/task.py', line 638 in apply
  request=request, propagate=throw)
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/celery-3.0.23-py2.7.egg/celery/task/trace.py', line 331 in eager_trace_task
  uuid, args, kwargs, request)
File '/var/www/mediagoblin/local/lib/python2.7/site-packages/celery-3.0.23-py2.7.egg/celery/task/trace.py', line 233 in trace_task
  R = retval = fun(*args, **kwargs)
File '/var/www/mediagoblin/mediagoblin/processing/task.py', line 98 in run
  processor.process(**reprocess_info)
File '/var/www/mediagoblin/mediagoblin/media_types/pdf/processing.py', line 407 in process
  self.extract_pdf_info()
File '/var/www/mediagoblin/mediagoblin/media_types/pdf/processing.py', line 333 in extract_pdf_info
  pdf_info_dict = pdf_info(self.pdf_filename)
File '/var/www/mediagoblin/mediagoblin/media_types/pdf/processing.py', line 224 in pdf_info
  page_size_parts = info_dict['Page size'].split()
KeyError: 'Page size'


CGI Variables
-------------
  CONTENT_LENGTH: '36728'
  CONTENT_TYPE: 'multipart/form-data; boundary=---------------------------150424529818653736141501385581'
  CSRF_TOKEN: u'16534688477188456553'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_ENCODING: 'gzip, deflate'
  HTTP_ACCEPT_LANGUAGE: 'es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3'
  HTTP_CONNECTION: 'keep-alive'
  HTTP_COOKIE: 'mediagoblin_csrftoken=16534688477188456553; MGSession=eyJtZXNzYWdlcyI6W10sInVzZXJfaWQiOiIxIn0.BS7DuQ.siuLyMQifqZwWBiD_7eG4khj0tQ; mediagoblin_csrftoken=16534688477188456553'
  HTTP_HOST: '192.168.1.108:6543'
  HTTP_REFERER: 'http://192.168.1.108:6543/submit/'
  HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0'
  PATH_INFO: '/submit/'
  REMOTE_ADDR: '192.168.1.102'
  REQUEST_METHOD: 'POST'
  SERVER_NAME: '0.0.0.0'
  SERVER_PORT: '6543'
  SERVER_PROTOCOL: 'HTTP/1.1'


WSGI Variables
--------------
  application: {(None, '/mgoblin_static'): <StaticURLParser '/var/www/mediagoblin/mediagoblin/static'>, (None, '/mgoblin_media'): <StaticURLParser '/var/www/mediagoblin/user_dev/media/public'>, (None, ''): <mediagoblin.app.MediaGoblinApp object at 0x27b8dd0>, (None, '/plugin_static'): <StaticURLParser '/var/www/mediagoblin/user_dev/plugin_static'>, (None, '/theme_static'): <StaticURLParser '/var/www/mediagoblin/user_dev/theme_static'>}
  paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x4bcbc90>
  paste.throw_errors: True
  werkzeug.request: <Request 'http://192.168.1.108:6543/submit/' [POST]>
  wsgi process: 'Multithreaded'
------------------------------------------------------------

Attachments (2)

calendar.odt (17.3 KB ) - added by ShawnRisk 10 years ago.
see_general.pdf (115.1 KB ) - added by ShawnRisk 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Bro666, 11 years ago

Milestone: 0.6.0

comment:2 by Christopher Allan Webber, 10 years ago

Milestone: 0.6.00.7.0

comment:3 by Kevin Brubeck Unhammer, 10 years ago

can you attach the document that causes the error? (seems like it's interpreted as pdf, not odf)

comment:4 by ShawnRisk, 10 years ago

I have tried a odt and pdf files which I got this in console:

2014-07-17 11:43:49,722 INFO [mediagoblin.media_types] No media handler found by file extension. Doing it the expensive way...
2014-07-17 11:43:49,723 INFO [mediagoblin.media_types.image.processing] Sniffing mediagoblin.media_types.image

by ShawnRisk, 10 years ago

Attachment: calendar.odt added

by ShawnRisk, 10 years ago

Attachment: see_general.pdf added

comment:5 by Jessica Tallon, 10 years ago

I have tried uploading both files ShawnRisk has uploaded, one of which is a .odt file. Can someone confirm this bug still exists and if so provide a file I'm able to test with?

comment:6 by Jessica Tallon, 10 years ago

Owner: set to Jessica Tallon
Status: newin_progress

comment:7 by Jessica Tallon, 10 years ago

Owner: Jessica Tallon removed
Resolution: fixed
Status: in_progressclosed

This is no longer an issue. This was fixed in 0021c06.

Note: See TracTickets for help on using tickets.