Skip to content

Error with Python 3.14 #133

@BigFatBass

Description

@BigFatBass

Hi Denis,

Python 3.14 was released on Oct. 7, 2025.

However the TTP work is broken with Python 3.14.

For example, I tried to run your sample code at https://ttp.readthedocs.io/en/latest/Quick%20start.html#as-a-module with TTP 0.9.5.
But I got the unexpected error as follows:

Traceback (most recent call last):
File "d:\TTP\Examples\main.py", line 34, in
main()
~~~~^^
File "d:\Distrib\Programming\Python\Libs\TTP - Template Text Parser\Examples\main.py", line 26, in main
parser = ttp(data=data_to_parse, template=ttp_template)
File "C:\Users\user\AppData\Local\Programs\Python\Python314\Lib\site-packages\ttp\ttp.py", line 240, in init
self.ttp = lazy_import_functions()
~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\user\AppData\Local\Programs\Python\Python314\Lib\site-packages\ttp\ttp.py", line 152, in lazy_import_functions
key.s: assignment.value.values[index].s
^^^^^
AttributeError: 'Constant' object has no attribute 's'

The same error is on both Windows and Linux.

There are no such errors with Python 3.13.

Are you planning to upgrade the project to Python 3.14?

Best Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions