Invalid f-string

80 views
Skip to first unread message

Jason Valenzuela

unread,
Apr 23, 2025, 12:45:31 PMApr 23
to reportlab-users
Encountered the following error when importing platypus objects:

File "/home/jvalenzuela/py37/lib/python3.7/site-packages/reportlab/platypus/__init__.py", line 7, in <module> from .flowables import *
File "<fstring>", line 1 (origin=)
SyntaxError: invalid syntax

This is with Python 3.7.17 and Reportlab 4.4.0. The problem appears to be the "{origin=}" and "{anchor=}" ValueError f-strings in platypus.flowables.PlacedStory.drawOn() added in a569763. The trailing equal sign in an f-string was added in Python 3.8, yet ReportLab 4.4.0 still advertises compatibility with Python 3.7.


Jason Valenzuela

Reply all
Reply to author
Forward
0 new messages