Skip to content
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

The callback (at least) is not python3 compatible. #4

Open
fcharlier opened this issue Jun 19, 2017 · 0 comments
Open

The callback (at least) is not python3 compatible. #4

fcharlier opened this issue Jun 19, 2017 · 0 comments

Comments

@fcharlier
Copy link
Member

Raises errors trying to serialize bytes from comments.

 [WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin (</home/naz/eNovance/git/DCI/dci-
ansible/callback/dci.CallbackModule object at 0x7f85e48f8a58>): b'success' is not JSON serializable

Which is fixed by the following:

--- a/callback/dci.py
+++ b/callback/dci.py
@@ -178,7 +178,7 @@ class CallbackModule(CallbackBase):
             # If no name has been specified to the play, play.name is equal
             # to the hosts value
             elif play.name and play.name not in play.hosts:
-                comment = play.name.encode('UTF-8')
+                comment = play.name #play.name.encode('UTF-8')
             else:
                 comment = ''

Also throws a bunch of exceptions after running:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f0eb5f15268>
Traceback (most recent call last):
  File "/home/naz/.virtualenvs/dci/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants