quoted urls UnicodeDecodeError
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Reproduce the failure with the quoted URL and then call click() or submit() on the response. Start with webtest/utils.py get_full_url and the WebOb request.py path_url and descriptors.py encget frames shown in the traceback; done means these actions no longer raise UnicodeDecodeError.
Written by the indexing model from the issue text.
Description
I use quoted URLs such as /fr/livres/cr%C3%A9ation/ (for /fr/livres/création/).
get() is working fine with these urls but once I have the response if I try to use click() or submit() on it I get the following error:
/usr/lib/python3.3/http/cookiejar.py:1588: UserWarning: http.cookiejar bug!
Traceback (most recent call last):
File "/usr/lib/python3.3/http/cookiejar.py", line 1586, in make_cookies
parse_ns_headers(ns_hdrs), request)
File "/usr/lib/python3.3/http/cookiejar.py", line 1543, in _cookies_from_attrs_set
cookie = self._cookie_from_cookie_tuple(tup, request)
File "/usr/lib/python3.3/http/cookiejar.py", line 1492, in _cookie_from_cookie_tuple
req_host, erhn = eff_request_host(request)
File "/usr/lib/python3.3/http/cookiejar.py", line 612, in eff_request_host
erhn = req_host = request_host(request)
File "/usr/lib/python3.3/http/cookiejar.py", line 597, in request_host
url = request.get_full_url()
File "/usr/local/lib/python3.3/dist-packages/WebTest-2.0.8.dev0-py3.3.egg/webtest/utils.py", line 116, in get_full_url
return self._request.url
File "/usr/local/lib/python3.3/dist-packages/WebOb-1.2.3-py3.3.egg/webob/request.py", line 505, in url
url = self.path_url
File "/usr/local/lib/python3.3/dist-packages/WebOb-1.2.3-py3.3.egg/webob/request.py", line 477, in path_url
bpath_info = bytes_(self.path_info, self.url_encoding)
File "/usr/local/lib/python3.3/dist-packages/WebOb-1.2.3-py3.3.egg/webob/descriptors.py", line 68, in fget
return req.encget(key, encattr=encattr)
File "/usr/local/lib/python3.3/dist-packages/WebOb-1.2.3-py3.3.egg/webob/request.py", line 167, in encget
return bytes_(val, 'latin-1').decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 5: invalid continuation byte
_warn_unhandled_exception()
I'm using Ubuntu 13.04 64 bit and Python 3.3.1 with the last commit of Webtest.
- Dominant language
- Python
- Stars
- 346
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Pylons/webtest
-
Attempt at double decoding of PATH_INFO when using Django and CookieJarPossibly taken @gyanu2507 claimed this 40 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Inline type hintsOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Similar issues
-
dependencies feature github_actions good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
wemake-services/wemake-django-template#3149 ·
Maintainers usually reply within 1 day
-
[request] vsg/1.1.16Openupstream update
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
conan-io/conan-center-index#31142 ·
Maintainers usually reply within 1 day
-
area:core bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
request-theme
Difficulty 2/5 Under an hour Newbie friendliness 70/100
LizardByte/ThemerrDB#8877 · 1 comment ·
Maintainers usually reply within 1 day
-
area/install-update comp/gateway P0 sweeper:risk-compatibility type/bug
Difficulty 2/5 Under an hour Newbie friendliness 72/100
NousResearch/hermes-agent#135997 · 3 comments ·
Maintainers usually reply within 1 day