lmmx / page-dewarp

Document image dewarping library using a cubic sheet model
MIT License
98 stars 17 forks source link

Python version 3.7 SyntaxError in f-string #7

Closed lalitmohan closed 2 years ago

lalitmohan commented 2 years ago

Actions: !pip install page-dewarp !cd page-dewarp !mkdir results && cd results !page-dewarp ../example_input/boston_cooking_a.jpg

Results: Traceback (most recent call last): File "/usr/local/bin/page-dewarp", line 33, in sys.exit(load_entry_point('page-dewarp==0.1.1', 'console_scripts', 'page-dewarp')()) File "/usr/local/bin/page-dewarp", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/local/lib/python3.7/dist-packages/importlib_metadata/init.py", line 203, in load module = import_module(match.group('module')) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 953, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/local/lib/python3.7/dist-packages/page_dewarp-0.1.1-py3.7.egg/page_dewarp/init.py", line 1, in from .main import * File "/usr/local/lib/python3.7/dist-packages/page_dewarp-0.1.1-py3.7.egg/page_dewarp/main.py", line 5, in from .image import WarpedImage File "", line 1 (size=) ^ SyntaxError: invalid syntax

lalitmohan commented 2 years ago

No longer facing this issue

NGStaph commented 2 years ago

how did you fix this?

zhanxinrui commented 12 months ago

No longer facing this issue

Facing the same problem, how did you fix it?

lmmx commented 11 months ago

Please open a new issue and share traceback and system info, please don’t just say “me too” on a closed issue whose poster has moved on or else I can't help :smiling_face_with_tear:

lmmx commented 1 week ago

I suspect this is a duplicate of #20: Python 3.7 does not support f-string f"{size=}" syntax with an equals sign in a variable.

Traceback confirms this is on Python 3.7:

File "/usr/local/lib/python3.7/dist-packages/importlib_metadata/init.py", line 203, in load

This software now supports Python version 3.9+