I got this warning from an incomplete method check:
if hasattr(w, 'to_json'):
return w.to_json()
######### warning, 'str' object is not callable
It assumed w.to_json
was a string. The solution was to add a callable()
check:
if hasattr(w, 'to_json') and callable(w.to_json):
Then the warning went away.