Open wolfgang42 opened 2 years ago
您好,我是李冬,您发来的邮件已收到,我将会尽快回复您
Open the folder of pyjade, and open runtime.py, then change from collections import Mapping as MappingType
into from collections.abc import Mapping as MappingType
. This problem solved, and it works ok for python 3.11.8. I don't know the reason, for i got this solution from my python teacher.
@fatsen Your (teacher’s) change works because Mapping
was moved from collections
to collections.abc
in Python 3.3.
However, do note that editing the source code of a library in the files that were installed is generally considered a bad idea: it will work on your computer, but is confusing when you come back to the program later when you have forgotten you did that, and is hard to keep track of if you ever give the program to someone else.
This was apparently a deprecated alias which was removed in Python 3.10; the new way of doing it is
collections.abc
.Workaround: use Python 3.9 instead.