ImportError: cannot import name url_encode
See original GitHub issueI’m facing the following error when trying to run knowledge-repo==0.8.8
.
knowledge_repo --repo . runserver --config config.py --port 7000
:
Traceback (most recent call last):
File "/home/kelvins/luizalabs/heisenberg/venv/bin/knowledge_repo", line 300, in <module>
from knowledge_repo.app.deploy import KnowledgeDeployer, get_app_builder
File "/home/kelvins/luizalabs/heisenberg/venv/lib/python3.6/site-packages/knowledge_repo/app/__init__.py", line 4, in <module>
from .app import KnowledgeFlask
File "/home/kelvins/luizalabs/heisenberg/venv/lib/python3.6/site-packages/knowledge_repo/app/app.py", line 20, in <module>
from werkzeug import url_encode
ImportError: cannot import name 'url_encode'
It seems knowledge-repo
does not pin the Werkzeug version and Werkzeug has released a new version 1.0.0 that breaks the retro compatibility (issue: https://github.com/pallets/werkzeug/issues/1714).
$ pip show werkzeug
Name: Werkzeug
Version: 1.0.0
Summary: The comprehensive WSGI web application library.
Home-page: https://palletsprojects.com/p/werkzeug/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: BSD-3-Clause
Location: /home/kelvins/luizalabs/heisenberg/venv/lib/python3.6/site-packages
Requires:
Required-by: knowledge-repo, Flask
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
cannot import name 'urlencode' when trying to install flask.ext ...
The urllib module has been split into parts and renamed in Python 3 to urllib.request, urllib.parse, and urllib.error.
Read more >Fixing ImportError: cannot import name 'urlencode' in Python3
Solution: As described by Fred Foo here on StackOverflow, Python3 contains urlencode() not in the urllib module but in urllib. parse .
Read more >ImportError: cannot import name urlencode on python2 #756
To install from the repository, just clone the repo (with git clone https://github.com/nficano/pytube ), then navigate to the directory it's ...
Read more >cannot import name 'urlencode' when trying to install flask.ext ...
Coding example for the question ImportError: cannot import name 'urlencode' when trying to install flask.ext.storage.
Read more >python3 导入from urllib import urlencode 报错 ... - CSDN博客
I have observed the following behavior in python 3.4.2, and I am unableto explain it. Hopefully someone could shed some light on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe you can suggest a PR? It seems to be here: https://github.com/airbnb/knowledge-repo/blob/master/knowledge_repo/_version.py#L39
I believe this issue was fixed by PR https://github.com/airbnb/knowledge-repo/pull/537, so I’m closing it.