FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

uploading straight text files does not generate a preview #394

Closed btbonval closed 9 years ago

btbonval commented 9 years ago

I uploaded a plain text file with a .txt extension and no preview is generated.

Here is the celery output related to the error (look at the last line):

[2015-01-27 13:35:19,027: INFO/MainProcess] Got task from broker: karmaworld.apps.document_upload.tasks.process_raw_document[26874f9d-21d0-4708-af5f-01f32169fe1c]
[2015-01-27 13:35:19,881: WARNING/PoolWorker-4] this is the mimetype of the document to check:
[2015-01-27 13:35:19,882: WARNING/PoolWorker-4] text/plain
[2015-01-27 13:35:19,883: INFO/MainProcess] URL being requested: https://www.googleapis.com/discovery/v1/apis/drive/v2/rest
[2015-01-27 13:35:19,884: INFO/MainProcess] Attempting refresh to obtain initial access_token
[2015-01-27 13:35:20,047: INFO/MainProcess] Refreshing access_token
[2015-01-27 13:35:20,325: INFO/MainProcess] URL being requested: https://www.googleapis.com/upload/drive/v2/files?ocr=false&convert=true&uploadType=resumable&alt=json
[2015-01-27 13:35:20,325: WARNING/MainProcess] new_request() takes at most 1 positional argument (2 given)
[2015-01-27 13:35:20,435: WARNING/MainProcess] new_request() takes at most 1 positional argument (2 given)
[2015-01-27 13:35:24,238: WARNING/PoolWorker-4] text -- https://docs.google.com/feeds/download/documents/export/Export?id=1oM3hafZ_JHEXW9OuiF5pHO3oDZfKqg9WwSJDXgKS-lU&exportFormat=txt
[2015-01-27 13:35:25,981: WARNING/PoolWorker-4] downloaded!
[2015-01-27 13:35:25,981: WARNING/PoolWorker-4] html -- https://docs.google.com/feeds/download/documents/export/Export?id=1oM3hafZ_JHEXW9OuiF5pHO3oDZfKqg9WwSJDXgKS-lU&exportFormat=html
[2015-01-27 13:35:26,276: WARNING/PoolWorker-4] downloaded!
[2015-01-27 13:35:27,381: INFO/MainProcess] Note Note at https://www.filepicker.io/api/file/Btp9ZZEzSkuP3KDTIaRI (from None) (1127) has no text, will not add to IndexDen

This might indicate that Google's text return (see timestamp 13:35:24,328 above) is coming back empty.

btbonval commented 9 years ago

This was related to and fixed in #393