terracotta-dash-example
terracotta-dash-example copied to clipboard
cannot run python3 tc_server.py
It thows Import error cannot import name 'convert_exceptions'
when I run python3 tc_server.py
python3 tc_server.py
Traceback (most recent call last):
File "tc_server.py", line 3, in <module>
from terracotta_toolbelt.extensions import point
File "/Volumes/data/SystemSoftwares/anaconda3/envs/terracotta_3.6/lib/python3.6/site-packages/terracotta_toolbelt/extensions/__init__.py", line 1, in <module>
import terracotta_toolbelt.extensions.point
File "/Volumes/data/SystemSoftwares/anaconda3/envs/terracotta_3.6/lib/python3.6/site-packages/terracotta_toolbelt/extensions/point.py", line 7, in <module>
from terracotta.server.flask_api import convert_exceptions
ImportError: cannot import name 'convert_exceptions'
Any suggestions?
I got the same error, running python3.8
import rasterio
from flask import jsonify
from rasterio import warp
from terracotta import get_settings, get_driver
from terracotta.exceptions import InvalidArgumentsError
#from terracotta.server.flask_api import convert_exceptions
def register(server):
@server.route("/point/<path:keys>/<string:lat>/<string:lng>", methods=["GET"])
#@convert_exceptions
I have only commented out the part where the "convert_exceptions" are imported. Then the server starts.