Closed Percent01 closed 8 years ago
duplicate of #26, pushed a suggested fix. please try if it works now.
Almost complete solution, but... I replace with this webui.py line 151 qs += " dir:\"%s\" " % q['dir'].decode('utf-8') Now the search is fine, but unfortunately I can't download or preview the file yet. This is the error message, what I get when I would like to preview the file:
Error 500: Internal Server Error Sorry, the requested URL 'http://xxxxxx.com/preview/0?query=a&dir=outputxxxxxxxx&after=&before=&sort=relevancyrating&ascending=0&page=1' caused an error:
Internal Server Error
Exception: AttributeError('internfile failure',)
Traceback: Traceback (most recent call last): File "Desktop/recoll/recoll-webui/bottle.py", line 744, in _handle return route.call(*_args) File "Desktop/recoll/recoll-webui/bottle.py", line 1479, in wrapper rv = callback(_a, **ka) File "Desktop/recoll/recoll-webui/webui.py", line 267, in preview tdoc = xt.textextract(doc.ipath) AttributeError: internfile failure
This error message get
<style type="text/css">
html {background-color: #eee; font-family: sans;}
body {background-color: #fff; border: 1px solid #ddd;
padding: 15px; margin: 15px;}
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
</style>
</head>
<body>
<h1>Error 500: Internal Server Error</h1>
<p>Sorry, the requested URL <tt>'http://xxxxxxxx.com/download/1?query=a&dir=output%2Fxxxxxxxxxx&after=&before=&sort=relevancyrating&ascending=0&page=1'</tt>
caused an error:</p>
<pre>Internal Server Error</pre>
<h2>Exception:</h2>
<pre>UnicodeEncodeError('ascii', u'Sending /srv/output/xxxxx.eml with mimetype message/rfc822', 59, 60, 'ordinal not in range(128)')</pre>
<h2>Traceback:</h2>
<pre>Traceback (most recent call last):
File "Desktop/recoll/recoll-webui/bottle.py", line 744, in _handle return route.call(*_args) File "Desktop/recoll/recoll-webui/bottle.py", line 1479, in wrapper rv = callback(_a, **ka) File "Desktop/recoll/recoll-webui/webui.py", line 298, in edit print >> sys.stderr, "Sending %s with mimetype %s" % (path, doc.mimetype) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 59: ordinal not in range(128)
I cannot reproduce this error, just checked with the latest webui code and it works fine here. Looking at the error messages I gather you're using an older revision or a fork - is there a specific reason for that or can you pull the latest revision and test?
I use the newest !official! version, but I will check again very soon.
This code snippet solve the problem, when I would like to search in directory, where directory name's contain special character: .decode('utf-8')
But when I would like to download or preview one of the result I get the error message above. I think the problem these characters: ˇ ^ ° Could you try it, when you have a file with special character with a special chacter directory and indexing and after would like download with recoll-webui? For example: <directory'+!(ˇ^°name>/<file'+!(ˇ^°name>
Thanks in advance for any help you are able to provide.
I think in the new version you miss the "Download" button from the "result.tpl"
Please put this line into result.tpl under the 'preview' part: < a href="download/{{number-1}}?{{query_string}}">Download< /a>
I would like to clarify the problem: I can't download files when the objects in the a specific file. For example I search in emails attachment and the directory or the file name contain "*" asterisk character.
Hi,
I'd gladly look at the issue, but I'd need a sample of a document which exhibiting the problem.
Either attach it here or send it to me by email: jf at dockes . org
If the sample document is an email, please don't forward it, as this might cause re-encoding somewhere along the transfer. Save it to an mbox or eml file, zip or gzip it, and send the result.
jf
no reply
Hi,
I get his error message, when I would like to search something in specific directory. (the directory include special eastern europe character)
Error 500: Internal Server Error Sorry, the requested URL 'http://xxxxxx.com/results?query=&dir=search_directory%2FPodiv%C3%ADnsk&after=&before=&sort=relevancyrating&ascending=0&page=1' caused an error:
Internal Server Error Exception:
UnicodeDecodeError('ascii', ' dir:"output/Podiv\xc3\xadnsk" ', 45, 46, 'ordinal not in range(128)') Traceback:
Traceback (most recent call last): File "/Desktop/recoll/recoll-webui/bottle.py", line 744, in _handle return route.call(_args) File "/Desktop/recoll/recoll-webui/bottle.py", line 1479, in wrapper rv = callback(_a, _ka) File "/Desktop/recoll/recoll-webui/bottle.py", line 2850, in wrapper result = func(_args, **kwargs) File "/Desktop/recoll/recoll-webui/webui.py", line 240, in results qs = query_to_recoll_string(query) File "/Desktop/recoll/recoll-webui/webui.py", line 151, in query_to_recoll_string qs += " dir:\"%s\" " % q['dir'] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 45: ordinal not in range(128)
I modified the pasted URL.