{{{
Traceback (most recent call last):
File "$SRC/tests/test_planner.py", line 49,
r = self.client.get(reverse_lazy('generator'))
File "$HOME/venvs/webapp/lib/python3.4/site-
packages/django/test/client.py", line 500, in get
**extra)
File "$HOME/venvs/webapp/lib/python3.4/site-
packages/django/test/client.py", line 303, in get
return self.generic('GET', path, secure=secure, **r)
File "$HOME/venvs/webapp/lib/python3.4/site-
packages/django/test/client.py", line 357, in generic
parsed = urlparse(path)
File
"$HOME/.pythonz/pythons/CPython-3.4.3/lib/python3.4/urllib/parse.py", line
292, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File
"$HOME/.pythonz/pythons/CPython-3.4.3/lib/python3.4/urllib/parse.py", line
112, in _coerce_args
return _decode_args(args) + (_encode_result,)
File
"$HOME/.pythonz/pythons/CPython-3.4.3/lib/python3.4/urllib/parse.py", line
96, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: '__proxy__' object has no attribute 'decode'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25424>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* owner: nobody => SoftwareMaven
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25424#comment:1>
Comment (by SoftwareMaven):
I've created a reproducer and a fix for this, based on the fix for 18776.
It is available at
https://github.com/SoftwareMaven/django/tree/ticket_25424.
This is my first foray into contributing to Django, so if there is
anything I missed in terms of process and what-not, please let me know.
--
Ticket URL: <https://code.djangoproject.com/ticket/25424#comment:2>
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Could you please transform your branch into a pull request ?
--
Ticket URL: <https://code.djangoproject.com/ticket/25424#comment:3>
Comment (by SoftwareMaven):
Sure thing: https://github.com/django/django/pull/5313
--
Ticket URL: <https://code.djangoproject.com/ticket/25424#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1a09b3c398b42800de864023dad872d83b196181" 1a09b3c]:
{{{
#!CommitTicketReference repository=""
revision="1a09b3c398b42800de864023dad872d83b196181"
Fixed #25424 -- Use force_str for test client URLs.
urlparse() fails with an AttributeError ("'__proxy__' object has no
attribute 'decode'") if reverse_lazy is used to look up the URL
(this is exactly the same problem that caused ticket #18776). The
solution is to use force_str() on the path before handing it to
urlparse().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25424#comment:5>