koniu / recoll-webui

web interface for recoll desktop search
266 stars 55 forks source link

Cannot Download/Open when HTML inside ZIP #14

Closed wonx closed 10 years ago

wonx commented 10 years ago

Hi,

I found another problem. When I click on "Download/Open" on a HTML document inside a ZIP file, instead of downloading or showing the html, I get an error message:

Error 500: Internal Server Error

Sorry, the requested URL 'http://server:8080/edit/8?query=hello&dir=%3Call%3E&after=&before=&sort=relevancyrating&ascending=0&page=1' caused an error:

Internal Server Error

Exception:

AttributeError('interntofile failure',)

Traceback:

Traceback (most recent call last):
  File "/root/recoll-webui-master/bottle.py", line 744, in _handle
    return route.call(**args)
  File "/root/recoll-webui-master/bottle.py", line 1479, in wrapper
    rv = callback(*a, **ka)
  File "/root/recoll-webui-master/webui.py", line 304, in edit
    path = xt.idoctofile(doc.ipath, doc.mimetype)
AttributeError: interntofile failure

Sorry for keeping you busy, and thanks in advance!

ghost commented 10 years ago

Hi,

Thanks again, and don't be sorry, it just shows that I did not do enough testing. However, I could not reproduce this, my zipped HTMLs just show up fine, so this must be a bit more complicated than the previous one.

The error seems to originate inside Recoll, not in the web layer, so we need to look at the Recoll log while this happens. There is some information about setting up the log file here: https://bitbucket.org/medoc/recoll/wiki/WhyIsMyFileNotIndexed

What Recoll version are you using ?

wonx commented 10 years ago

I am using recoll 1.19.3 in Debian 7.1

I deleted my recoll database and I created it again. For some reason, recoll mixed up the contents of a zip file and linked an image (.png) instead of the html document. It's weird, but it seems that indeed, the error originated inside Recoll. I havn't been able to reproduce the same error with any other file.