Jupyter at finish make metafiles without *.json

good day to everyone. I decided to use a generator of images from layers to obtain nft. I started it, prescribed layers, added a description to the meta data, the generation took place and pictures and strange files without an extension appeared, when you tear them off in a text editor, they contain all the metadata that I need. but files without the json extension. I also get one large json file with a description of the attributes for each file , but without a description of the entire collection and without a link to ipfs . What am I doing wrong? I understand that this question may not be suitable for this topic forums and may have already met before, please redirect. thanks.

some code -

Generate Metadata for all Traits

METADATA_FILE_NAME = ‘./metadata/coll_All_traits.json’;
with open(METADATA_FILE_NAME, ‘w’) as outfile:
json.dump(all_images, outfile, indent=7)

f = open(‘./metadata/coll_All_traits.json’,)
data = json.load(f)

IMAGES_BASE_URI = “ipfs://…/”
PROJECT_NAME = “cats #”

def getAttribute(key, value):
return {
“trait_type”: key,
“value”: value
for i in data:
token_id = i[‘cat #’]
token = {
“image”: IMAGES_BASE_URI + str(token_id) + ‘.png’,
“tokenId”: token_id,
“name”: PROJECT_NAME + ’ ’ + str(token_id),
“description”: “bla bla bla .”,
token[“attributes”].append(getAttribute(“background”, i[“background”]))
token[“attributes”].append(getAttribute(“body”, i[“body”]))
token[“attributes”].append(getAttribute(“action”, i[“action”]))
token[“attributes”].append(getAttribute(“cat”, i[“cat”]))
token[“attributes”].append(getAttribute(“eyes”, i[“eyes”]))
token[“attributes”].append(getAttribute(“nose”, i[“nose”]))
token[“attributes”].append(getAttribute(“items”, i[“items”]))

with open('./metadata/' + str(token_id), 'w') as outfile:
    json.dump(token, outfile, indent=4)