Fixed polling from javascript to python.