Problem with json

I followed Mosh example in the picture above and got AttributeError and I don’t know what to change to fix it.

line 9, in
data = json.dump(movies)
AttributeError: partially initialized module ‘json’ has no attribute ‘dump’ (most likely due to a circular import)

Any help on how to fix this is appreciated.

Instead of using
data = json.dump()
use this
data = json.dumps()
Hope this helps

@brancore87 : Thanks a lot. It worked.

One other error I made was that I had another python file named “” and this was creating a circular import as I imported the json class from the library.