I noticed this problem when a computer running Ubuntu was updated recently and the default version of Python changed to 2.7.
import json import numpy as np
The problem is that with the first you don't get an int. You get a numpy.int64. That cannot be serialized.