Create CPython components using Hops in Grasshopper

Hi,
I’m getting a weird error in the Hops component in Grasshopper. I’ve defined a function in Python that returns a mesh, exactly as my previous Blender example.
However, now it refuses to connect with Grasshopper, and gives this error:
1. Solution exception:Unexpected character encountered while parsing value: U. Path '', line 0, position 0.

The path is http://localhost:5000/getmesh and I’ve also tried with http://127.0.0.1:5000/getmesh.

Any ideas about what might be causing it to fail? Also, is there a manual way to clear the caches? It often gives me an error message about code that has been changed (when it worked before), making me think that there was still a Flask app or something working in the background…