Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

3.11 excalibur issues #68

Closed
reeddolphin opened this issue Feb 18, 2023 · 12 comments
Closed

3.11 excalibur issues #68

reeddolphin opened this issue Feb 18, 2023 · 12 comments

Comments

@reeddolphin
Copy link

camelot-dev/excalibur#151

I actually came looking for a container because I didn't want to deal with this issue/other local issues im having with ghostscript myself. but it sure does seem like excalibur doesn't like python versions above 3.7.

docker container run -v ~/excalibur-data:/home/python/excalibur -e PORT=8081 -p 8081:8081 ghcr.io/williamjacksn/excalibur

Traceback (most recent call last): File "/home/python/docker-excalibur/run.py", line 5, in <module> from excalibur import configuration as conf File "/home/python/venv/lib/python3.11/site-packages/excalibur/configuration.py", line 7, in <module> from backports.configparser import ConfigParser File "/home/python/venv/lib/python3.11/site-packages/backports/configparser/__init__.py", line 130, in <module> from collections import MutableMapping ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/local/lib/python3.11/collections/__init__.py)

Totally separately, i assume this is user error completely, but any guess as to why this fails to open at http://127.0.0.1:8081/ ?
docker container run -v ~/excalibur-data:/home/python/excalibur -e PORT=8081 -p 8081:8081 ghcr.io/williamjacksn/excalibur:0.4.3
Screenshot 2023-02-18 at 9 28 18 AM

@williamjacksn
Copy link
Owner

I probably should not have tried to upgrade the version of Python in the image. I just reverted that change, so the latest image now runs on Python 3.9. Give that a try again.

The image tagged 0.4.3 was from before I wrote a custom entrypoint, and doesn't support listening on a custom port.

@williamjacksn
Copy link
Owner

williamjacksn commented Feb 18, 2023

Possibly fixed in 09eceac

@kayarre
Copy link

kayarre commented Mar 1, 2023

Getting and error from local build

git clone [email protected]:williamjacksn/docker-excalibur.git

cd docker-excalibur

docker build . --tag excalibur 

docker container run -v ~/build/excalibur/data:/home/python/excalibur -e PORT=8081 -p 8081:8081 excalibur
Creating new Excalibur configuration file in: /home/python/excalibur/excalibur.cfg
Traceback (most recent call last):
  File "/home/python/docker-excalibur/run.py", line 8, in <module>
    from excalibur.www.app import create_app
  File "/home/python/venv/lib/python3.9/site-packages/excalibur/www/app.py", line 3, in <module>
    from flask import Flask, Blueprint
  File "/home/python/venv/lib/python3.9/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
  File "/home/python/venv/lib/python3.9/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/home/python/venv/lib/python3.9/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/home/python/venv/lib/python3.9/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/home/python/venv/lib/python3.9/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/python/venv/lib/python3.9/site-packages/markupsafe/__init__.py)

@williamjacksn
Copy link
Owner

@kayarre Update your clone, build the image, and try again. I rolled markupsafe back to 2.0.1, which is the last version to have soft_unicode.

@kayarre
Copy link

kayarre commented Mar 1, 2023

Huzzah! thank you! It runs.

trying to use the thing got me an error though.

ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/home/python/venv/lib/python3.9/site-packages/excalibur/executors/sequential_executor.py", line 12, in execute_command
    subprocess.check_call(command, stderr=subprocess.STDOUT, close_fds=True)
  File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['excalibur', 'run', '--task', 'split', '--uuid', 'd00be4e6-9493-4c19-b196-bc9f48a5c5e2']' returned non-zero exit status 1.

I am going to try to sort it out myself.

@jbrodriguez
Copy link

jbrodriguez commented Mar 4, 2023

hi, i'm getting the same ImportError: libGL.so.1: cannot open shared object file: No such file or directory error, this is a docker running on linux host

@kayarre if you have a solution, pls let me know

@williamjacksn
Copy link
Owner

Can you tell I don't actively use this project anymore? 🤣

I think I need to roll all the way back to the 0.4.3 tag and add my custom entrypoint there. The Camelot and Excalibur projects have not seen updates in a long time, so it's dangerous to update their dependencies to the latest versions.

@jbrodriguez
Copy link

jbrodriguez commented Mar 5, 2023

@williamjacksn that makes sense.

i'm curious, are you using something other than excalibur+camelot or you just don't need this type of flow ?

if it's the former i'd like to know about it :)

i'm currently using tabula and although it works it hasn't received updates in quite a while, so i'm always looking for alternatives, in case it stops working

@williamjacksn
Copy link
Owner

I just don't have a need for this right now. It was always for personal stuff, and I found other ways to collect the data that I was originally extracting from PDFs.

And I take back what I said about Camelot, it actually had a new release last week!

https://pypi.org/project/camelot-py/0.11.0/

Anyway, I am happy to try to get this working as soon as I have some time.

@jbrodriguez
Copy link

thanks, i found this issue in the camelot repo

camelot-dev/camelot#193 (comment)

not sure what the base os is on your dockerfile (where the python:3.9.16.x draws from), but it looks like it requires something like libgl1-mesa-glx installed in order to work

i'll try to test it / create a pr, sometime this week

@williamjacksn
Copy link
Owner

In #72 I rolled back many requirements to old versions to get everything to run. I tested the container image locally and it is working for me.

Please let me know if this latest change works for you.

@jbrodriguez
Copy link

thanks a lot man ! it's working now !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants