urls.py crashes on Darwin under Python 3.5: An unknown error occurred: a bytes-like object is required, not 'str' #19265
Labels
affects_2.2
This issue/PR affects Ansible v2.2
bug
This issue/PR relates to a bug.
net_tools
Net-tools category
python3
Projects
ISSUE TYPE
COMPONENT NAME
lib/ansible/module_utils/urls.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
MacOS Sierra 10.12.1
Darwin eve 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
Python 3.5 in a virtualenv
SUMMARY
urls.py
uses an outdated set of assumptions aboutos.write()
STEPS TO REPRODUCE
Attempt to load any https URL via
fetch_url()
Minimal playbook:
EXPECTED RESULTS
Merrily loading the URL as requested
ACTUAL RESULTS
Instrumenting the code to surface the traceback, got me this:
The text was updated successfully, but these errors were encountered: