koniu / recoll-webui

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

cant start recoll-webui #3

Closed logg-sar closed 10 years ago

logg-sar commented 11 years ago

hi there

when i'm trying to start the webui on my debian squeeze i get this message:

python ./webui-standalone.py Traceback (most recent call last): File "./webui-standalone.py", line 3, in import webui File "/media/daten/download/recoll-webui/webui.py", line 6, in import recoll ImportError: No module named recoll

is it my fault?

cu netlord

koniu commented 11 years ago

The error means that the recoll python module is not found in python's module search path. Do you have the recoll package installed?

redoxmatlab commented 10 years ago

Same problem for me. Please provide some information. I have recoll installed but cannot install recoll python on Ubuntu 13.04. Maybe because the version of recoll is 1.19 and that of the recoll python is 1.17. Please provide command lines if required. I am not a linux expert.

ghost commented 10 years ago

Please uninstall recoll and python recoll:

sudo apt-get remove recoll python-recoll

And install Recoll from the Recoll PPA. The package on the PPA has both Recoll and Recoll Python in one.

Instructions for installing from the PPA are at the following page (but I guess your 1.19 package already comes from there ?):

https://launchpad.net/~recoll-backports/+archive/recoll-1.15-on

redoxmatlab commented 10 years ago

Hello,

I've uninstalled recoll and installed it again then tried to run the python webui-standalone.py command but I am still getting the following error:

Traceback (most recent call last): File "webui-standalone.py", line 3, in import webui File "~/Downloads/recoll-webui-master/webui.py", line 13, in import recoll ImportError: No module named recoll

By the way, when I re-installed recoll by calling sudo apt-get install recoll python-recoll I got one error below but recoll gui was installed ok;

Selecting previously unselected package recoll. Unpacking recoll (from .../recoll_1.19.5-1~ppa1~raring1_amd64.deb) ... Unpacking python-recoll (from .../python-recoll_1.17.3-2_amd64.deb) ... dpkg: error processing /var/cache/apt/archives/python-recoll_1.17.3-2_amd64.deb (--unpack): trying to overwrite '/usr/lib/python2.7/dist-packages/Recoll-1.0.egg-info', which is also in package recoll 1.19.5-1~ppa1~raring1 Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for menu ... Processing triggers for hicolor-icon-theme ... Processing triggers for man-db ... Errors were encountered while processing: /var/cache/apt/archives/python-recoll_1.17.3-2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Can you help further please?

ghost commented 10 years ago

Please do not install python-recoll at all.

redoxmatlab commented 10 years ago

Even when I tried again without installing python-recoll and installing recoll only I am still not able to run webui-standalone.py. I am getting the same error again. I have no clue who to add recoll to the python's module search path as suggested above. Could you please provide some more details on this.

Thanks

ghost commented 10 years ago

Ok. So I take it that you have recoll 1.19.5 installed from the PPA, and python-recoll not installed. Could you please try to start python in a terminal (just type python), and enter the two following command, then copy/paste the result:

from recoll import recoll
recoll.connect()

(If the first command fails, of course, no need to try the 2nd one)

redoxmatlab commented 10 years ago

the code seems to run ok, here is the output Python 2.7.4 (default, Apr 19 2013, 18:28:01) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from recoll import recoll recoll.connect

redoxmatlab commented 10 years ago

Ok I reinstalled python and run the "python webui-standalone.py" command again. I get localhost:8080 working but then there is a shutdown error that I do not understand. Here is the output:

Bottle server starting up (using WSGIRefServer())... Listening on http://localhost:8080/ Hit Ctrl-C to quit.

Shutdown... Traceback (most recent call last): File "webui-standalone.py", line 6, in bottle.run(host='localhost', port=8080, reloader=True) File "~/Downloads/recoll-webui-master/bottle.py", line 2422, in run server.run(app) File "~/Downloads/recoll-webui-master/bottle.py", line 2123, in run srv = make_server(self.host, self.port, handler, *_self.options) File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server server = server_class((host, port), handler_class) File "/usr/lib/python2.7/SocketServer.py", line 419, in init self.server_bind() File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind HTTPServer.server_bind(self) File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind SocketServer.TCPServer.server_bind(self) File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind self.socket.bind(self.server_address) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(_args) socket.error: [Errno 98] Address already in use

ghost commented 10 years ago

Ok, not too sure what the shutdown error is, and not sure it's important either. Could you please now try the server: restart webui-standalone, connect to localhost:8080 from a browser on the same machine. If this works, we're done :)

redoxmatlab commented 10 years ago

restart webui-standalone gives an unknown job.

redoxmatlab commented 10 years ago

I have a PhP server running on my machine so that might be using the 8080 port. I just changed al the 8080 to 8090 in bottle.py and restart webui-standalone.py files. Recoll web interface works just fine on localhost:8090. I hope opening port 8090 does not bring any security implications, I am ignorant in these things!

ghost commented 10 years ago

Sorry, I did not mean to use the restart command, just to make sure the webui was not running then start it on the command line.

Any port over 1024 is equivalent security-wise, so 8080 or 8090 is just the same. Anyway, as the webui is running on "localhost", no connection is possible from the network (which makes it not too useful by the way).

If you want to connect from a different host, you'll need to change "localhost" to the real host name or IP address (something like '192.168.0.xx')

If you are running this on your home network with unroutable addresses (192.168...), there is still no security issue (if you trust your family...). Don't do this at work...

If your host has a global address, you are hopefully supposed to know what you do...

redoxmatlab commented 10 years ago

Thanks for the advice. This is a great addition to recoll. I hope development of this project continues.

Great work. Best reagrds

koniu commented 10 years ago

Seems like no unresolved issues here - closing

almereyda commented 10 years ago

Thanks for the tip with the PPA. Should be in the docs, though.

Ubuntu 14.04