-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with string concat and implicit conversion of bytes to chars #20588
Comments
Can you add information about how to reproduce the error message? Just running inventory scripts under Python 3? |
Yes, I'm working on an inventory script. The error message was the one above "data needs to be formatted as a json dict" but instead I was getting "Can't convert 'bytes' object to str implicitly" error |
Also, I am running ansible 2.1, but the source in the master branch here (assuming that is 2.3) I assume has the same problem because it is not encoding the err object |
in
ansible/inventory/script.py
there is code like:I had to to change to this to get the actual error message (instead of the encoding error):
sys.stderr.write(err.decode('ascii') + "\n")
I'm running python 3.
The text was updated successfully, but these errors were encountered: