koniu / recoll-webui

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

errors after fresh install #43

Closed aoster closed 8 years ago

aoster commented 8 years ago

Hello,

I have just found this interesting project and planning to use it in combination with recoll to setup a server-side search engine for our PDF and Office files.

I have pulled the files from git and gave the webgui-standalone.py a try but run into the following issue:

Error 500: Internal Server Error

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

Internal Server Error Exception:

EnvironmentError("Configuration could not be built:\nExplicitly specified configuration directory must exist (won't be automatically created). Use mkdir first",) Traceback:

Traceback (most recent call last): File "/var/lib/recoll/recoll-webui/bottle.py", line 744, in _handle return route.call(_args) File "/var/lib/recoll/recoll-webui/bottle.py", line 1479, in wrapper rv = callback(_a, _ka) File "/var/lib/recoll/recoll-webui/bottle.py", line 2850, in wrapper result = func(_args, **kwargs) File "/var/lib/recoll/recoll-webui/webui.py", line 243, in results res, nres, timer = recoll_search(query) File "/var/lib/recoll/recoll-webui/webui.py", line 182, in recoll_search query = recoll_initsearch(q) File "/var/lib/recoll/recoll-webui/webui.py", line 159, in recoll_initsearch db = recoll.connect(config['confdir']) EnvironmentError: Configuration could not be built: Explicitly specified configuration directory must exist (won't be automatically created). Use mkdir first

I have started the webgui with the same user which created the recoll index files. Linux version is Ubuntu Trusty 14.04.2, recoll is 1.20.X from the ppa.

Does anyone know what could be the issue ?

Thank you for your kind help.

regards

Andreas

ghost commented 8 years ago

Hi,

Not too sure what is happening here. Is RECOLL_CONFDIR set in the webui environment ? This should not be necessary if the user running the ui has the configuration directory in the standard place (~/.recoll), but you could try to set it in case the automatic computation fails for some reason.

Otherwise, you could set a trace in rclconfig.py at line 148, to see what directory it is actually trying to access.

Cheers,

jf

aoster commented 8 years ago

Hello jf,

thank you very much for your answer. Setting RECOLL_CONFDIR did the trick.

best regards

Andreas

aipie0066 commented 8 years ago

hello jf, aoster I encountered the same problem, how you solve it. Can you give me more details about "Setting RECOLL_CONFDIR". thanks.

ghost commented 8 years ago

This is an environment variable, so how you set it depends on how you run the webui... For example in the shell: export RECOLL_CONFDIR=/path/to/recoll/config-directory /path/to/webui-standalone.py

The recoll configuration directory would typically be ".recoll" in the home directory for the user who is doing the indexing. You'll have to take care that the webui has at least read access to everything in there.

But it all depends on your setup.

aipie0066 commented 8 years ago

thanks, I get it. just open the shell and type the following: export RECOLL_CONFDIR=/your recoll's config-directory /path/to/webui-standalone.py appreciate your great job.

Hardy74 commented 5 years ago

Hello,

on raspbian strech lite i get the same error with different line numbers: Traceback (most recent call last): File "/home/pi/document-vault/recoll-webui/bottle.py", line 744, in _handle return route.call(args) File "/home/pi/document-vault/recoll-webui/bottle.py", line 1479, in wrapper rv = callback(*a, *ka) File "/home/pi/document-vault/recoll-webui/bottle.py", line 2850, in wrapper result = func(args, kwargs) File "/home/pi/document-vault/recoll-webui/webui.py", line 226, in results res, nres, timer = recoll_search(query) File "/home/pi/document-vault/recoll-webui/webui.py", line 173, in recoll_search db = recoll.connect('~/.recoll') AttributeError: 'module' object has no attribute 'connect'

There i hardcoded the path to the config dir, with the same result. Ocrmypdf and recollindex seems to work allright, the entries in the xapiandb folder get actual timestamps after recollindex.

I use python 2.7.13 and recoll-webui 1.18.1 and recoll 1.22