Help With Python code for NFT project.

Job ID: 33723282

Budget: £250 – £750 GBP

Most of the coding and all image traits have been completed for an NFT project. However I need help to resolve a few issues in python.

The code is based on the following tutorial: https://medium.com/scrappy-squirrels/tutorial-create-generative-nft-art-with-rarities-8ee6ce843133

Opening PNG1 you will see includes all traits labelled as in the config file stacking from bottom to top..

1. Background
2. Anal Fin (can't see in this image but it is there)
4. Body
5. Body Patterns
6. Gonopodium (cant see in this image but it is there.
7. Tail
8. Mouth
9. Dorsal
10. Accessories 2
11. Pectoral Fin
12. Accessories 1
13. Speed
14. Courage
15. Intelligence
16. Attractiveness
17. Sociability
18. Fertility

The config file now has weights for most traits following the guide.

i've modified the NFT.py file for the increase in trait categories. However the program no longer compiles the images. I guess there is something
wrong relating the trait layers and I keep on getting a "key error"

What I need help with.

1. The program now does not seem to run. Can you get it working.

2. The seagull trait has a top and bottom layer, although they are both in folder Accessories 1 the Top Seagull should stay in Accessories 1
while the Bottom Seagull layer needs to be located at same "level" as the Anal Fin. Can this be coded?

3. Some of the traits in 'Accessories 1' are only compatible with certain other traits of a different trait type. You can see this in the
"Trait Rarity Male Guppies" excel in this folder on github. Can this be programmed in for the Beree, Cap, Moustache and worm?

4. For each NFT i'd like to generate three images which will go into a unique URL for each NFT on IPFS. These correspond to
PNG1 - the full image with all traits.
PNG2 - The image with following traits removed to be used for Avatar pics. (Speed, Courage, Intelligence, Attractiveness, Sociability & Fertility).
PNG 3 - The image with the background and score system removed plus the following traits removed as this png will be used in the future
for fish in a virtual aquairum space...
Background, Speed, Courage, Intelligence, Attractiveness, Sociablity, Fertility,
Accessories 2: Seagull top & bottom, Bubbles, Flakes, Daphnia, Brine shrimp, Hearts,
Mouth : Hook line
The naming of these images i'd like to be something consistent using the ID numbers in the metadata

5. I will be loading some Female traits in separate zip files in soon to generate part of the collection. There will be 8K male fish overall
using the traits here so far, 1000 normal female fish, 500 pregnant female fish and 500 "bent spine" fish.

So the male fish will have IDs 1-8000, i'd then like to generate the female collection from 8001-9000 9001-9500 and bent spine 9501 t0 10K.
Do you know how to change the initial number generated in the collection for metadata etc?
Finally, in order to get for example the right/left fins and eyes on different layers they were named as such. However, id like the metadata to not distinguish between the right and left trait type for the same trait.