octplane/ansible_stdout_compact_logger

Python 3 errors

Closed this issue · 6 comments

I tried running this logger in a Python3 only environment.

First, I got an error that reload was not found. I imported it with:

from importlib import reload.

Then I got another error that sys does not have a method called setdefaultencoding. I located the line in the __init__ method that uses this and tried to do some magic there but I failed. I read that reload and sys.setdefaultencoding are deprecated and a bad practice in python3.

How could we get this module running for python 3?

Hello @tterranigma,
master has been patched to run correctly with python3. Let me know if it works correctly for you.

Nevermind, i just encountered the problem, but after updating the plugin it works.;)
I never had this problem before. I'm using this plugins since one month, I don't now why i only got this error today

@DidelotK If you use brew, you mac might have received an update that switched to python3.

Works great! Really nice logger.

thanks! 🙇