see this see post
or try with IronPython(2 or 3)
you may encounter other bugs with Revit 2024 + CPython3 (there have been slight changes)