LanguageMachines / PICCL

A set of workflows for corpus building through OCR, post-correction and normalisation
Other
48 stars 6 forks source link

No zip file generated in webinterface #38

Closed peterdekker closed 6 years ago

peterdekker commented 6 years ago

When using the CLAM webinterface, it is possible to download a zip/tar.gz/bz2 archive of all the output files at the end of the pipeline. In our installation, the .tar.gz and .bz2 files work, but clicking the .zip archive link gives an error.

I looked for the error message in the httpd log file. email@address.nl is my username, peternieuw is the name of my project:

[Fri Jun 29 14:01:38.007708 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632] mod_wsgi (pid=25652): Exception occurred processing WSGI script '/vol1/lamachine/lib/python3.6/site-packages/clamservices/wsgi/picclservice.wsgi'.
[Fri Jun 29 14:01:38.008399 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632] Traceback (most recent call last):
[Fri Jun 29 14:01:38.008563 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]   File "/vol1/lamachine/lib/python3.6/site-packages/werkzeug/wsgi.py", line 870, in __next__
[Fri Jun 29 14:01:38.008601 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]     return self._next()
[Fri Jun 29 14:01:38.008635 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]   File "/vol1/lamachine/lib/python3.6/site-packages/werkzeug/wrappers.py", line 82, in _iter_encoded
[Fri Jun 29 14:01:38.008672 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]     for item in iterable:
[Fri Jun 29 14:01:38.008703 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]   File "/vol1/lamachine/lib/python3.6/site-packages/clam/clamservice.py", line 601, in getbinarydata
[Fri Jun 29 14:01:38.008718 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632]     with io.open(path,'rb') as f:
[Fri Jun 29 14:01:38.008799 2018] [wsgi:error] [pid 25652] [remote 172.16.10.43:54632] FileNotFoundError: [Errno 2] No such file or directory: '/vol1/lamachine/piccl.clam/projects/email@address.nl/peternieuw/output/peternieuw.zip'

FYI, we are using a custom picclservice.wsgi, with the following contents:

#/usr/bin/env python3
import sys
import os
import site

WEBSERVICEDIR = '/vol1/lamachine/lib/python3.6/site-packages/clam/'
sys.path.append(WEBSERVICEDIR)
os.environ['PYTHONPATH'] = WEBSERVICEDIR

from picclservice import picclservice
import clam.clamservice
application = clam.clamservice.run_wsgi(picclservice)
proycon commented 6 years ago

Hmm... Is zip (and unzip) installed on the system? Could be an oversight that I didn't include explicitly in LaMachine.

peterdekker commented 6 years ago

Yes, that was the problem! I installed them manually, now it works. Thanks!

proycon commented 6 years ago

Great, made an extra issue to solve this in LaMachine itself soon too.