openpaperwork / paperwork

Personal document manager (Linux/Windows) -- Moved to Gnome's Gitlab
https://gitlab.gnome.org/World/OpenPaperwork/paperwork
2.43k stars 148 forks source link

crash after the last Ubuntu update #143

Closed philuser closed 11 years ago

philuser commented 11 years ago

Since the last update of the distribution (raring ubuntu) and a 'git pull' followed by 'paperwork $ sudo python. / setup.py install', the application no longer works. In the main window, the box 'documents' is empty and the mouse icon is waiting. When I scan the application crashes at the end of the progress bar. the scan goes well during the calibration in the preferences. the log of operations:

@Meghost:/usr/local/share/paperwork$ paperwork  
Workers: Worker thread started
Looking for locales in 'locale/fr/LC_MESSAGES/paperwork.mo' ...
Looking for locales in '/usr/local/share/locale/fr/LC_MESSAGES/paperwork.mo' ...
Will use locales from '/usr/local/share/locale'
Config file found: /home/philuser/.config/paperwork.conf

(paperwork:29795): Gtk-WARNING **: Could not load image 'paperwork.svg': Impossible d'ouvrir le fichier « /usr/local/share/paperwork/paperwork.svg » : Aucun fichier ou dossier de ce type
UI file used: ./mainwindow.glade
Stopping worker [Building page image]
Image view port resized. (0, 0) --> (565, 688)
Worker Building page image: 0 ; False
Workers: Queueing [Building page image]
Workers: [Building page image] started
Workers: [Building page image] ended
Action: [Rebuild index]
Stopping worker [Document reindexation]
Stopping worker [Document examination]
Stopping worker [Document examination]
Worker Document reindexation: 0 ; False
Workers: Queueing [Document reindexation]
Workers: [Document reindexation] started
Opening index dir '/home/philuser/.local/share/paperwork/index' ...
Failed to open index '/home/philuser/.local/share/paperwork/index'
Will try to create a new one
Workers: [Document reindexation] ended
Worker [Document reindexation] raised an exception: __init__() got an unexpected keyword argument 'spelling'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 47, in run
worker._wrapper(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 154, in _wrapper
    self.__last_ret_value = BasicWorker._wrapper(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 105, in _wrapper
    return self.do(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/mainwindow.py", line 129, in do
    docsearch = DocSearch(self.__config.workdir, self.__progress_cb)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/backend/docsearch.py", line 232, in __init__
    content=whoosh.fields.TEXT(spelling=True),
TypeError: __init__() got an unexpected keyword argument 'spelling'
Stopping worker [Building page image]
Image view port resized. (565, 688) --> (565, 661)
Worker Building page image: 0 ; False
Workers: Queueing [Building page image]
Workers: [Building page image] started
Workers: [Building page image] ended

Then when I run a scan:

Action: [Scan a single page]
Worker Scanning page: 0 ; False
Workers: Queueing [Scanning page]
Workers: [Scanning page] started
Workers: [Progress bar updater: main window progress bar] started
Scanner mode set to 'Color'
Warning: Unable to set scanner source to 'Auto': <class 'pyinsane.rawapi.SaneStatus'> : Data is invalid (4)
Workers: [Progress bar updater: main window progress bar] ended
Scanner resolution: 300
Scanner calibration: ((0, 0), (1273, 1753))
Calibration resolution: 200
Cropping: (0, 0, 1909, 2629)
Saving scan (rotated 0 degree) in '/home/philuser/papers/20130422_1803_48/rotated.0.bmp'
Saving scan (rotated -90 degree) in '/home/philuser/papers/20130422_1803_48/rotated.1.bmp'
Saving scan (rotated -180 degree) in '/home/philuser/papers/20130422_1803_48/rotated.2.bmp'
Saving scan (rotated -270 degree) in '/home/philuser/papers/20130422_1803_48/rotated.3.bmp'
Stopping worker [Progress bar updater: main window progress bar]
Stopping worker [Progress bar updater: main window progress bar]
Using Tesseract for OCR
Will use 8 process(es) for OCR
Running OCR on '/home/philuser/papers/20130422_1803_48/rotated.3.bmp'
Running OCR on '/home/philuser/papers/20130422_1803_48/rotated.2.bmp'
Running OCR on '/home/philuser/papers/20130422_1803_48/rotated.0.bmp'
Running OCR on '/home/philuser/papers/20130422_1803_48/rotated.1.bmp'
Workers: [Progress bar updater: main window progress bar] started
Evaluating score of this page orientation (/home/philuser/papers/20130422_1803_48/rotated.0.bmp) using method 'spell_checker' ...
Spell checking: Replacing: tourt -> tour
Page orientation score: 5205
Evaluating score of this page orientation (/home/philuser/papers/20130422_1803_48/rotated.2.bmp) using method 'spell_checker' ...
Spell checking: Replacing: saAg -> sang
Spell checking: Replacing: maad -> ma ad
Spell checking: Replacing: saonos -> sonos
Spell checking: Replacing: sawn -> sain
Evaluating score of this page orientation (/home/philuser/papers/20130422_1803_48/rotated.3.bmp) using method 'spell_checker' ...
Spell checking: Replacing: guno -> guano
Evaluating score of this page orientation (/home/philuser/papers/20130422_1803_48/rotated.1.bmp) using method 'spell_checker' ...
Page orientation score: 25
Spell checking: Replacing: dnna -> donna
Spell checking: Replacing: LutE -> Lute
Page orientation score: 310
Page orientation score: 0
Best: 5205.000000 -> /home/philuser/papers/20130422_1803_48/rotated.0.bmp
Extracting boxes ...
Done
Scan done
Workers: [Scanning page] ended
Worker [Scanning page] raised an exception: 'DummyDocSearch' object has no attribute 'index_page'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 47, in run
    worker._wrapper(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 154, in _wrapper
    self.__last_ret_value = BasicWorker._wrapper(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/workers.py", line 105, in _wrapper
    return self.do(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/mainwindow.py", line 663, in do
    self.__main_win.docsearch.index_page(page)
AttributeError: 'DummyDocSearch' object has no attribute 'index_page'
Workers: [Progress bar updater: main window progress bar] ended

I also uninstalled paperwork (deleting all files exept ~/paper) and re-installed without change.

philuser commented 11 years ago

I use ubuntu raring (13/04) with kernel 3.8.8

philuser@Meghost:~$ uname -a Linux Meghost 3.8.8-030808-generic #201304170248 SMP Wed Apr 17 06:49:45 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

2013/4/22 Jerome Flesch notifications@github.com

Can you specify which Linux distribution you are using please ?

— Reply to this email directly or view it on GitHubhttps://github.com/jflesch/paperwork/issues/143#issuecomment-16803807 .

jflesch commented 11 years ago

Actually, I saw that you already specified that information, but only right after I posted my message ... sorry for that :)

jflesch commented 11 years ago

I have a Ubuntu raring running in a VM, but I'm unable reproduce this problem :(

Here are 2 things you can try:

1) check the version of python-whoosh you're using:

$ python
>>> import whoosh
>>> whoosh.__version__

On Ubuntu raring, you should have at least the 2.4.1.

2) in src/paperwork/backend/docsearch.py, you can replace the line:

content=whoosh.fields.TEXT(spelling=True),

by:

content=whoosh.fields.TEXT(),

You may have to remove all the "spelling=True" in the following lines as well.

It's a crappy workaround. It will make suggestions slower. But it might give us some idea of what the problem is.

jflesch commented 11 years ago

So, is there anything new ?

jflesch commented 11 years ago

Since this ticket has been inactive for a while, I'm closing it. Please reopen it if the problem is still there.