Comments (14)
Hi,
Please check that your webui.py file has code like the following near the top:
try:
from recoll import recoll
from recoll import rclextract
hasrclextract = True
except:
import recoll
hasrclextract = False
This is to confirm that your copy is indeed updated for the 1.19 Recoll Python package.
If this is ok, then the next possibility is that there is a mixup of both versions of the Recoll Python package installed. There should be a "recoll" directory where your local python packages are installed (e.g.: /usr/lib/python2.7/dist-packages, but this could be under /usr/local and/or under site-packages). Check that there is no recoll.so file at the same level as the recoll directory (there should be a recoll.so inside the recoll directory). If there is a recoll.so at the same level as the directory, just delete it.
I sure regret having chosen the same name (recoll) for the package as was previously used for the module, it's causing no end of trouble...
from recoll-webui.
Yes, the copy is updated; the code is exactly as you wrote it.
I only found one copy of recoll.so, inside the "recoll" directory in "/usr/lib/python2.6/dist-packages.
I tried now to completely uninstall recoll and delete the previous database and reinstall it again, with no luck. I still get the same error. The operating system of the computer where it is running is Debian 6. However, I tried your script in my laptop computer (Linux mint 14) and it works, so there must be something wrong with my server. Maybe the python version is too old?
from recoll-webui.
I have no reason to believe that the module does not work with Python 2.6, but I'm not too sure I've ever tested either.
This has to be an issue with the Recoll Python module, no need to reinstall anything else or rebuild the index.
Could you please try the following:
-
Check that there is only one Python version on the server.
-
Start python on the command line and try the following command:
from recoll import recoll
-
If it works, you can try:
recoll.connect()
from recoll-webui.
user@box-media:~$ python
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from recoll import recoll
>>> recoll.connect()
<recoll.Db object at 0xb73ef080>
>>>
What else?
from recoll-webui.
At this point we know that things are working normally when you load the recoll module from the command line python, but not from the recoll-webui script.
Does it make any difference if you start Python with "/usr/bin/env python" instead of the above ? This is how the script starts Python.
Where did you start the webui script from ?
I'm just poking in the dark, really, I have no real idea what may be happening here, except that it seems that the script is somehow loading the wrong thing as a recoll module... So this should have something to do with the Python module search path (sys.path), or the current directory when the script is started.
from recoll-webui.
It doesn't make any difference if I start python with "/usr/bin/env python" and run the same commands.
I'm starting the script from my home directory:
user@box-media:~$ cd
user@box-media:~$ cd recoll-webui-master/
user@box-media:~/recoll-webui-master$ ./webui-standalone.py
Bottle server starting up (using WSGIRefServer())...
Listening on http://box-media:3888/
Hit Ctrl-C to quit.
From this terminal, I can see the search queries. I usually enter the URL from another computer in the same network, but now I also tried it from the local server, and I get the same error message.
from recoll-webui.
Ok. I'm out of ideas at this point.
I think I'll try to install debian 6 in a virtual machine and see if I can reproduce the problem.
The standard Debian recoll packages are not up to date. How did you install 1.19.5 (I want to do it like you) ?
from recoll-webui.
Don't worry. I should upgrade my server to a clean version of debian 7, because I've been messing up with my current installation so much that it isn't strange that sometimes things stop working unexpectedly.
I installed the last version of recoll using repositories. Add the following to /etc/apt/sources.list
#Recoll
deb http://ppa.launchpad.net/recoll-backports/recoll-1.15-on/ubuntu lucid main
deb-src http://ppa.launchpad.net/recoll-backports/recoll-1.15-on/ubuntu lucid main
Also, I run my X programs inside a VNC server. And the whole server is virtualised inside a openVZ container.
from recoll-webui.
By the way. I quickly installed a debian 7 server, with recoll 1.19.5 the way I just told you, and then I try to run your script (this time from the /root directory), I get:
root@box-media7:~/recoll-webui-master# ./webui-standalone.py
Traceback (most recent call last):
File "./webui-standalone.py", line 3, in <module>
import webui
File "/root/recoll-webui-master/webui.py", line 13, in <module>
import recoll
ImportError: No module named recoll
root@box-media7:~/recoll-webui-master#
Also:
root@box-media7:~# python
Python 2.7.3 (default, Jan 2 2013, 16:53:07)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from recoll import recoll
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named recoll
>>>
from recoll-webui.
Are you still using the lucid packages ? Because they probably install for python 2.6 and you are now running python 2.7
Here is what I did:
- Installed Debian Wheezy (7.1)
- Installed the regular recoll and python-recoll packages (to easily get the dependancies)
- Uninstalled recoll and python-recoll
- Added the PPA to the apt sources, replacing lucid with qantal (precise does not work because the requested libc is too new)
- apt-get-install recoll (this also installs the python module because it's integral to the PPA package)
- Unpacked recoll-webui-master
- Ran the standalone server
-> Worked
I noticed by the way that recoll-webui needs the topdirs variable to be explicitely defined in ~/.recoll/recoll.conf, which is not necessarily the case for a default recoll install (it defaults to ~). Anyway, topdirs = ~ did it.
I am not sure that it's really wise to use the PPA Ubuntu packages on Debian. I wonder if you might not be better off just compiling recoll from source (which is really not hard). This business of choosing the Ubuntu release by trial and error does not appear too sound to me :)
from recoll-webui.
Under debian wheezy (7.1), and using the oneiric (not quantal) version of the PPA, i've been able to install a recoll version (1.19.3) that worked with your script. Also, I think that python-recoll isn't needed in the last version of recoll. (not sure)
I know, using an Ubuntu ppa in Debian is not wise at all. It just was quick and dirty way of trying recoll in my server. Now that I see that it's possible to make it work, I'll find a more appropiate way of installing it.
Thank you for your patience, you are doing a great job!
from recoll-webui.
using the oneiric (not quantal)
Oops, sorry, I seem to have trouble with my alphabet. And the worse thing is that I did try qantal before going back to oneiric which is the one with which it did work, and then I do it again by writing qantal !
from recoll-webui.
Hello.
I have the exact same problem as described by wonx.
Everything works as expected with webui-standalone.py but with webui-wsgi.py there is exactly the same error as described by wonx.
my python version is 2.7
i downloaded and installed the packages directly from https://github.com/koniu/recoll-webui
i checked everything that you wrote above.
do you have any idea what could be wrong?
many thanks in advance
from recoll-webui.
Hello
Ok. I found a solution.
As you set a user and group for the WSGIDaemonProcess you have to make sure, this user has access to the index-files and also the config in ~/.recoll/
thanks for this great software
from recoll-webui.
Related Issues (20)
- query performance CLI vs. webui HOT 3
- WSGI path problems
- Open file in browser without the need for local files. To be used as a service on a server HOT 1
- Recoll Web UI Error 500 (WSGI) HOT 3
- NOTE: A (Python 3) fork is actively maintained here HOT 3
- AttributeError("'NoneType' object has no attribute 'ipath'",) HOT 2
- The koniu repository on GitHub has not been updated for some time
- Permanent locations settings for all users HOT 2
- License missing HOT 1
- Fallback to operation without rclextract fails
- HTTP 500 after saving settings HOT 1
- How to run using https? HOT 1
- linux error trying to run webui HOT 1
- After indexing the first file, webui no longer works HOT 3
- Recoll WebUI for windows server HOT 1
- Recoll WebUi - Need one for mobile HOT 4
- Fails to start with Python 3.10 HOT 1
- except re.error, e: HOT 3
- Any new release is possible or planned? HOT 1
- Recoll is not indexing my Matlab code files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recoll-webui.