cannot import name '_rule_re' from 'werkzeug.routing'
YaoJusheng opened this issue · 7 comments
In my code, it has a similar error.
By the way, the quart-openapi
version I used is 1.7.2
with the version of quart is 0.18.0
.
The error message is as follows:
...
from werkzeug.routing import _rule_re as ROUTE_VAR_RE
ImportError: cannot import name '_rule_re' from 'werkzeug.routing' ...
Originally posted by @YaoJusheng in #38 (comment)
I hit the same issue. It is probably not wise to import an object starting with _
from another library, this is probably meant as private
+1 to issue. I think this is the commit in werkzeug that refactored the routing module pallets/werkzeug@88125be. it looks like some of the names and re patterns have changed since then also.
I have the same issue... is there any update on this?
thanks in advance
my current workaround was to downgrage:
[tool.poetry.dependencies]
python = "^3.10"
quart = "0.17.0"
quart-cors = "0.5.0"
swagger-ui-py = "22.7.13"
quart-openapi = "1.7.2"
flask-sqlalchemy = "2.5.1"
werkzeug = "2.1.2"
aiohttp = "3.8.3"
quart to 0.17.0
flask-sqlalchemy to 2.5.1
werkzeug to 2.1.2
quart-cors to 0.5.0
+1
+1
replace swagger.py line 14
from werkzeug.routing import _rule_re as ROUTE_VAR_RE
=>
from werkzeug.routing.rules import _part_re as ROUTE_VAR_RE
it works with werkzeug 3.0.1