File "h5py\h5g.pyx", line 161, in h5py.h5g.create ValueError: Unable to create group (name already exists)

C
model_json = model.to_json()
with open(file_name + ".json", "w") as json_file:
        json_file.write(model_json)
model.save_weights(file_name + '.h5')
Source

Also in C: