python11报错cannot import name 'Container' from 'collections'
部署项目的时候报错:
1
ImportError: cannot import name ‘Mapping‘ from ‘collections‘
修复的方法也很简单:
将如下代码:
1
2
from collections import Mapping
from collections import MutableMapping
修改为:
1
2
from collections.abc import Mapping
from collections.abc import MutableMapping
重启项目,问题解决。
类似报错还有:
1
Impo