Reputation: 1
I have module with name Ioanv1:
...
person1={"temp_lags": [-21.96,-21.82,-21.89,-21.99]}
...
def ....
Now I want to replace person1 with new data in another script:
import json
import Ioanv1
person1={"temp_lags": [-21,-21,-21,-21]}
jsonToPython = Ioanv1(person1)
print(jsonToPython)
I get TypeError: 'module' object is not callable Could you please help me.
Upvotes: 0
Views: 79
Reputation: 1486
Error message is simple and clear.
Ioanv1 is module
You are using Ioanv1(person1)
which you can not.
You probably want something like: Ioanv1.person1
Upvotes: 1