Closed beda42 closed 6 years ago
This is actually an upstream bug so whilst you are strictly correct that "unlike in previous versions of Django", the behaviour has been fixed/reverted:
https://code.djangoproject.com/ticket/29627
Fixed and released in 5.12.1
Sorry, for that. I should have checked upstream.
Hi there,
I just found that when running with the UrllibBackend under Django 2.1, I get an error when using slack_message
This is because the value of the
SLACK_AS_USER
setting is passed into thedjango.http.request.urlencode
function in its "raw" form and unlike in previous versions of Django, where it got converted into string, Django 2.1 tries to run .encode directly on it.The fix should be fairly easy - just convert the values into strings before url-encoding, but as there may be unforeseen consequences, I would rather leave it to someone who knows the codebase better.
Best regards Beda
p.s.- If
SLACK_AS_USER
is set toTrue
than there is a simple workaround by changing this value to string in settingsSLACK_AS_USER='True'
. Another workaround is to switch to RequestsBackend which does not have this problem.