我的代码在本地运行正常,但是在Heroku上崩溃了。我该怎么做才能修复它?
Traceback (most recent call last)
File "/app/nao_entre_em_panico.py", line 2, in <module>
from flask import Flask, jsonify, request
File "/app/.heroku/python/lib/python3.10/site-packages/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "/app/.heroku/python/lib/python3.10/site-packages/werkzeug/__init__.py", line 151, in <module>
__import__('werkzeug.exceptions')
File "/app/.heroku/python/lib/python3.10/site-packages/werkzeug/exceptions.py", line 71, in <module>
from werkzeug.wrappers import Response
File "/app/.heroku/python/lib/python3.10/site-packages/werkzeug/wrappers.py", line 27, in <module>
from werkzeug.http import HTTP_STATUS_CODES, \
File "/app/.heroku/python/lib/python3.10/site-packages/werkzeug/http.py", line 1148, in <module>
from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization, \
File "/app/.heroku/python/lib/python3.10/site-packages/werkzeug/datastructures.py", line 16, in <module>
from collections import Container, Iterable, MutableSet
ImportError: cannot import name 'Container' from 'collections' (/app/.heroku/python/lib/python3.10/collections/__init__.py)
1条答案
按热度按时间kmpatx3s1#
Container
、Iterable
、MutableSet
和其他抽象基类在Python 3.3之后的collections.abc
中。