Update minimal required Python to 3.10
rmast opened this issue · 2 comments
This error was caused by requiring Python 3.9 in the readme:
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://10.11.0.4:8501
2024-08-21 12:57:35.364 Uncaught app exception
Traceback (most recent call last):
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.__dict__)
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/marker_app.py", line 14, in <module>
from marker.convert import convert_single_pdf
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/marker/convert.py", line 12, in <module>
from marker.tables.table import format_tables
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/marker/tables/table.py", line 3, in <module>
from marker.schema.page import Page
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/marker/schema/page.py", line 6, in <module>
from surya.schema import TextDetectionResult, LayoutResult, OrderResult
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/surya/schema.py", line 141, in <module>
class OCRResult(BaseModel):
File "/home/rmast/miniconda3/envs/marker/lib/python3.9/site-packages/surya/schema.py", line 143, in OCRResult
languages: List[str] | None = None
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
Geëlimineerd
Same, doesn't seem to work for Python 3.9:
marker-api | Traceback (most recent call last):
marker-api | File "/app/api.py", line 10, in
marker-api | from marker.convert import convert_single_pdf
marker-api | File "/app/marker/convert.py", line 12, in
marker-api | from marker.tables.table import format_tables
marker-api | File "/app/marker/tables/table.py", line 3, in
marker-api | from marker.schema.page import Page
marker-api | File "/app/marker/schema/page.py", line 6, in
marker-api | from surya.schema import TextDetectionResult, LayoutResult, OrderResult
marker-api | File "/usr/local/lib/python3.9/dist-packages/surya/schema.py", line 141, in
marker-api | class OCRResult(BaseModel):
marker-api | File "/usr/local/lib/python3.9/dist-packages/surya/schema.py", line 143, in OCRResult
marker-api | languages: List[str] | None = None
marker-api | TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
marker-api exited with code 1