Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open JSON? #50

Open
CptJackieSparrow opened this issue Apr 11, 2023 · 12 comments
Open

Can't open JSON? #50

CptJackieSparrow opened this issue Apr 11, 2023 · 12 comments
Assignees
Labels
issue Something that could be fixed.

Comments

@CptJackieSparrow
Copy link

Traceback (most recent call last):
File "PATH\nft-generator-py-main\generate.py", line 147, in
generate_unique_images(int(args.amount), loadJSON(args.config))
File "PATH\nft-generator-py-main\lib\util\io.py", line 9, in loadJSON
contents = json.loads("".join(pathFile.readlines()))
File "C:\Users\PATH\miniconda3\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\PATH\miniconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\PATH\miniconda3\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 38 column 3 (char 9226)

I'm having this error when i try to python generate.py --amount 222 --config config.json

@Jon-Becker
Copy link
Owner

Can you upload your json here? If you would rather it be private, you can email it to jonathan@jbecker.dev. Thanks!

@Jon-Becker Jon-Becker added the issue Something that could be fixed. label Apr 11, 2023
@Jon-Becker Jon-Becker self-assigned this Apr 11, 2023
@CptJackieSparrow
Copy link
Author

CptJackieSparrow commented Apr 11, 2023

{
  "layers": [
    {
      "name": "Background",
      "values": ["Archway Background 01", "Archway Background 02", "Archway Background 03", "Archway Background 04", "Archway Background 05", "Archway Background 06", "Archway Background 07", "Archway Background 08", "Archway Background 09", "Brown", "Cyan", "Exterior Background 01", "Exterior Background 02", "Green", "Interior Background 01", "Interior Background 02", "Interior Background 03", "Interior Background 04", "Interior Background 05", "Interior Background 06", "Interior Background 07", "Landscape Background 01", "Landscape Background 02", "Purple Interior Background 01", "Purple Interior Background 02", "Purple", "Red"],
      "trait_path": "./trait-layers/Background",
      "filename": ["Archway Background 01", "Archway Background 02", "Archway Background 03", "Archway Background 04", "Archway Background 05", "Archway Background 06", "Archway Background 07", "Archway Background 08", "Archway Background 09", "Brown", "Cyan", "Exterior Background 01", "Exterior Background 02", "Green", "Interior Background 01", "Interior Background 02", "Interior Background 03", "Interior Background 04", "Interior Background 05", "Interior Background 06", "Interior Background 07", "Landscape Background 01", "Landscape Background 02", "Purple Interior Background 01", "Purple Interior Background 02", "Purple", "Red"],
      "weights": [3,3,3,3,3,3,3,3,3,12,12,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,11,11]
    },
    {
      "name": "Clothing",
      "values": ["Female Clothing 01 Blue", "Female Clothing 01 Dark", "Female Clothing 01 Green", "Female Clothing 01", "Female Clothing 02 Blue", "Female Clothing 02 Dark", "Female Clothing 02 Green", "Female Clothing 02 Yellow", "Female Clothing 02", "Female Clothing 03 Blue", "Female Clothing 03 Dark", "Female Clothing 03 Green", "Female Clothing 03", "Female Clothing 05 Blue", "Female Clothing 05 Dark", "Female Clothing 05 Green", "Female Clothing 05 Red", "Female Clothing 05 Yellow", "Female Clothing 06 Blue", "Female Clothing 06 Dark", "Female Clothing 6 Green", "Female Clothing 6 Red", "Female Clothing 6 Yellow", "Male Clothing 01 Blue", "Male Clothing 01 Dark", "Male Clothing 01 Green", "Male Clothing 01", "Male Clothing 02 Blue", "Male Clothing 02 Dark", "Male Clothing 02 Green", "Male Clothing 02 Yellow", "Male Clothing 02", "Male Clothing 04 Blue", "Male Clothing 04 Dark", "Male Clothing 04", "Male Clothing 05 Dark", "Male Clothing 05 Greem", "Male Clothing 05", "Male Clothing 06", "Male Clothing 07", "Male Clothing 08", "Male Clothing 09", "Male Clothing 10", "Male Clothing 11 Blue", "Male Clothing 11 Green", "Male Clothing 11 Yellow", "Male Clothing 11", "Male Clothing 12 Green", "Male Clothing 12 Yellow", "Male Clothing 12"],
      "trait_path": "./trait-layers/Clothing",
      "filename": ["Female Clothing 01 Blue", "Female Clothing 01 Dark", "Female Clothing 01 Green", "Female Clothing 01", "Female Clothing 02 Blue", "Female Clothing 02 Dark", "Female Clothing 02 Green", "Female Clothing 02 Yellow", "Female Clothing 02", "Female Clothing 03 Blue", "Female Clothing 03 Dark", "Female Clothing 03 Green", "Female Clothing 03", "Female Clothing 05 Blue", "Female Clothing 05 Dark", "Female Clothing 05 Green", "Female Clothing 05 Red", "Female Clothing 05 Yellow", "Female Clothing 06 Blue", "Female Clothing 06 Dark", "Female Clothing 6 Green", "Female Clothing 6 Red", "Female Clothing 6 Yellow", "Male Clothing 01 Blue", "Male Clothing 01 Dark", "Male Clothing 01 Green", "Male Clothing 01", "Male Clothing 02 Blue", "Male Clothing 02 Dark", "Male Clothing 02 Green", "Male Clothing 02 Yellow", "Male Clothing 02", "Male Clothing 04 Blue", "Male Clothing 04 Dark", "Male Clothing 04", "Male Clothing 05 Dark", "Male Clothing 05 Greem", "Male Clothing 05", "Male Clothing 06", "Male Clothing 07", "Male Clothing 08", "Male Clothing 09", "Male Clothing 10", "Male Clothing 11 Blue", "Male Clothing 11 Green", "Male Clothing 11 Yellow", "Male Clothing 11", "Male Clothing 12 Green", "Male Clothing 12 Yellow", "Male Clothing 12"],
      "weights": [2,1,2,1,2,1,2,2,1,2,1,2,2,2,1,2,2,2,2,1,2,2,2,2,1,2,2,2,1,3,3,3,3,1,3,1,3,3,1,1,1,1,3,3,3,3,3,3,3,3]
    },
    {
      "name": "Gender",
      "values": ["Female Dark", "Female Darkest", "Female Lighest", "Female Light", "Female Mid", "Male Dark", "Male Darkest", "Male Light", "Male Lightest", "Male Mid"],
      "trait_path": "./trait-layers/Gender",
      "filename": ["Female Dark", "Female Darkest", "Female Lighest", "Female Light", "Female Mid", "Male Dark", "Male Darkest", "Male Light", "Male Lightest", "Male Mid"],
      "weights": [10,10,10,10,10,10,10,10,10,10]
    },
    {
      "name": "Head",
      "values": ["Female Head Scarf 01 Blue", "Female Head Scarf 01 Dark", "Female Head Scarf 01 Pink", "Female Head Scarf 01 Yellow", "Female Head Scarf 01", "Female Head Scarf 02 Dark", "Female Head Scarf 02 Green", "Female Head Scarf 02", "Female Head Scarf 03 Blue", "Female Head Scarf 03 Dark", "Female Head Scarf 03 Green", "Female Head Scarf 03", "Female Head Scarf 04 Blue", "Female Head Scarf 04 Dark", "Female Head Scarf 04 Green", "Female Head Scarf 04", "Female Head Scarf 05 Blue", "Female Head Scarf 05 Dark", "Female Head Scarf 05 Green", "Female Head Scarf 05 Yellow", "Female Head Scarf 05", "Female Head Scarf 06 Blue", "Female Head Scarf 06 Dark", "Female Head Scarf 06 Green", "Female Head Scarf 06 Yellow", "Female Head Scarf 06", "Female Head Scarf 07 Blue", "Female Head Scarf 07 Dark", "Female Head Scarf 07 Green", "Female Head Scarf 07 Orange", "Female Head Scarf 07 Purple", "Female Head Scarf 07", "Female Head Scarf 08 Blue", "Female Head Scarf 08 Dark", "Female Head Scarf 08 Green", "Female Head Scarf 08 Purple", "Female Head Scarf 08 Yellow", "Female Head Scarf 08", "Female Head Scarf 09 Blue", "Female Head Scarf 09 Dark", "Female Head Scarf 09 Green", "Female Head Scarf 09 Purple", "Female Head Scarf 09 Yellow", "Female Head Scarf 09", "Female Head Scarf 10 Blue", "Female Head Scarf 10 Dark", "Female Head Scarf 10 Green", "Female Head Scarf 10 Purple", "Female Head Scarf 10 Yellow", "Female Head Scarf 10", "Female Head Scarf 11 Blue", "Female Head Scarf 11 Dark", "Female Head Scarf 11 Green", "Female Head Scarf 11 Rose", "Female Head Scarf 11", "Male Turban 01 Dark", "Male Turban 01 Green", "Male Turban 01 Red", "Male Turban 01", "Male Turban 02 Dark", "Male Turban 02", "Male Turban 03 Dark", "Male Turban 03", "Male Turban 04 Dark", "Male Turban 04 Green", "Male Turban 04", "Male Turban 05 Dark", "Male Turban 05", "Male Turban 06 Dark", "Male Turban 06", "Male Turban 07 Dark", "Male Turban 07", "Male Turban 08 Dark", "Male Turban 08", "Male Turban 09"],
      "trait_path": "./trait-layers/Head",
      "filename": ["Female Head Scarf 01 Blue", "Female Head Scarf 01 Dark", "Female Head Scarf 01 Pink", "Female Head Scarf 01 Yellow", "Female Head Scarf 01", "Female Head Scarf 02 Dark", "Female Head Scarf 02 Green", "Female Head Scarf 02", "Female Head Scarf 03 Blue", "Female Head Scarf 03 Dark", "Female Head Scarf 03 Green", "Female Head Scarf 03", "Female Head Scarf 04 Blue", "Female Head Scarf 04 Dark", "Female Head Scarf 04 Green", "Female Head Scarf 04", "Female Head Scarf 05 Blue", "Female Head Scarf 05 Dark", "Female Head Scarf 05 Green", "Female Head Scarf 05 Yellow", "Female Head Scarf 05", "Female Head Scarf 06 Blue", "Female Head Scarf 06 Dark", "Female Head Scarf 06 Green", "Female Head Scarf 06 Yellow", "Female Head Scarf 06", "Female Head Scarf 07 Blue", "Female Head Scarf 07 Dark", "Female Head Scarf 07 Green", "Female Head Scarf 07 Orange", "Female Head Scarf 07 Purple", "Female Head Scarf 07", "Female Head Scarf 08 Blue", "Female Head Scarf 08 Dark", "Female Head Scarf 08 Green", "Female Head Scarf 08 Purple", "Female Head Scarf 08 Yellow", "Female Head Scarf 08", "Female Head Scarf 09 Blue", "Female Head Scarf 09 Dark", "Female Head Scarf 09 Green", "Female Head Scarf 09 Purple", "Female Head Scarf 09 Yellow", "Female Head Scarf 09", "Female Head Scarf 10 Blue", "Female Head Scarf 10 Dark", "Female Head Scarf 10 Green", "Female Head Scarf 10 Purple", "Female Head Scarf 10 Yellow", "Female Head Scarf 10", "Female Head Scarf 11 Blue", "Female Head Scarf 11 Dark", "Female Head Scarf 11 Green", "Female Head Scarf 11 Rose", "Female Head Scarf 11", "Male Turban 01 Dark", "Male Turban 01 Green", "Male Turban 01 Red", "Male Turban 01", "Male Turban 02 Dark", "Male Turban 02", "Male Turban 03 Dark", "Male Turban 03", "Male Turban 04 Dark", "Male Turban 04 Green", "Male Turban 04", "Male Turban 05 Dark", "Male Turban 05", "Male Turban 06 Dark", "Male Turban 06", "Male Turban 07 Dark", "Male Turban 07", "Male Turban 08 Dark", "Male Turban 08", "Male Turban 09"],
      "weights": [2,1,2,2,2,1,2,1,1,1,1,1,2,2,1,2,1,1,2,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
    },
    {
      "name": "Nation",
      "values": ["Afgan", "Bangladesh", "Palestine", "Syria", "Turkey", "Zimbabwe"],
      "trait_path": "./trait-layers/Head",
      "filename": ["Afgan", "Bangladesh", "Palestine", "Syria", "Turkey", "Zimbabwe"],
      "weights": [17,17,17,17,16,16]
    },
  ],
  "incompatibilities": [
    {
      "layer": "Head",
      "value": ["Female Head Scarf 01 Blue", "Female Head Scarf 01 Dark", "Female Head Scarf 01 Pink", "Female Head Scarf 01 Yellow", "Female Head Scarf 01", "Female Head Scarf 02 Dark", "Female Head Scarf 02 Green", "Female Head Scarf 02", "Female Head Scarf 03 Blue", "Female Head Scarf 03 Dark", "Female Head Scarf 03 Green", "Female Head Scarf 03", "Female Head Scarf 04 Blue", "Female Head Scarf 04 Dark", "Female Head Scarf 04 Green", "Female Head Scarf 04", "Female Head Scarf 05 Blue", "Female Head Scarf 05 Dark", "Female Head Scarf 05 Green", "Female Head Scarf 05 Yellow", "Female Head Scarf 05", "Female Head Scarf 06 Blue", "Female Head Scarf 06 Dark", "Female Head Scarf 06 Green", "Female Head Scarf 06 Yellow", "Female Head Scarf 06", "Female Head Scarf 07 Blue", "Female Head Scarf 07 Dark", "Female Head Scarf 07 Green", "Female Head Scarf 07 Orange", "Female Head Scarf 07 Purple", "Female Head Scarf 07", "Female Head Scarf 08 Blue", "Female Head Scarf 08 Dark", "Female Head Scarf 08 Green", "Female Head Scarf 08 Purple", "Female Head Scarf 08 Yellow", "Female Head Scarf 08", "Female Head Scarf 09 Blue", "Female Head Scarf 09 Dark", "Female Head Scarf 09 Green", "Female Head Scarf 09 Purple", "Female Head Scarf 09 Yellow", "Female Head Scarf 09", "Female Head Scarf 10 Blue", "Female Head Scarf 10 Dark", "Female Head Scarf 10 Green", "Female Head Scarf 10 Purple", "Female Head Scarf 10 Yellow", "Female Head Scarf 10", "Female Head Scarf 11 Blue", "Female Head Scarf 11 Dark", "Female Head Scarf 11 Green", "Female Head Scarf 11 Rose", "Female Head Scarf 11"],
      "incompatible_with": ["Male Dark", "Male Darkest", "Male Light", "Male Lightest", "Male Mid", "Male Clothing 01 Blue", "Male Clothing 01 Dark", "Male Clothing 01 Green", "Male Clothing 01", "Male Clothing 02 Blue", "Male Clothing 02 Dark", "Male Clothing 02 Green", "Male Clothing 02 Yellow", "Male Clothing 02", "Male Clothing 04 Blue", "Male Clothing 04 Dark", "Male Clothing 04", "Male Clothing 05 Dark", "Male Clothing 05 Greem", "Male Clothing 05", "Male Clothing 06", "Male Clothing 07", "Male Clothing 08", "Male Clothing 09", "Male Clothing 10", "Male Clothing 11 Blue", "Male Clothing 11 Green", "Male Clothing 11 Yellow", "Male Clothing 11", "Male Clothing 12 Green", "Male Clothing 12 Yellow", "Male Clothing 12"],
      "default": {
        "value": "Default Incompatibility",
        "filename": "./trait-layers/foreground/logo"
      },
      "layer": "Head",
      "value": ["Male Turban 01 Dark", "Male Turban 01 Green", "Male Turban 01 Red", "Male Turban 01", "Male Turban 02 Dark", "Male Turban 02", "Male Turban 03 Dark", "Male Turban 03", "Male Turban 04 Dark", "Male Turban 04 Green", "Male Turban 04", "Male Turban 05 Dark", "Male Turban 05", "Male Turban 06 Dark", "Male Turban 06", "Male Turban 07 Dark", "Male Turban 07", "Male Turban 08 Dark", "Male Turban 08", "Male Turban 09"],
      "incompatible_with": ["Female Dark", "Female Darkest", "Female Lighest", "Female Light", "Female Mid", "Female Clothing 01 Blue", "Female Clothing 01 Dark", "Female Clothing 01 Green", "Female Clothing 01", "Female Clothing 02 Blue", "Female Clothing 02 Dark", "Female Clothing 02 Green", "Female Clothing 02 Yellow", "Female Clothing 02", "Female Clothing 03 Blue", "Female Clothing 03 Dark", "Female Clothing 03 Green", "Female Clothing 03", "Female Clothing 05 Bluıe", "Female Clothing 05 Dark", "Female Clothing 05 Green", "Female Clothing 05 Red", "Female Clothing 05 Yellow", "Female Clothing 06 Blue", "Female Clothing 06 Dark", "Female Clothing 6 Green", "Female Clothing 6 Red", "Female Clothing 6 Yellow"],
      "default": {
        "value": "Default Incompatibility",
        "filename": "./trait-layers/foreground/logo"
      }
    }
  ],
  "baseURI": ".",
  "name": "NFT #",
  "description": "This is a description for this NFT series."
}

@CptJackieSparrow
Copy link
Author

CptJackieSparrow commented Apr 11, 2023

Can you upload your json here? If you would rather it be private, you can email it to jonathan@jbecker.dev. Thanks!

Dude, that was fast! TY!

All rarities adds up to 100
I've used an older version where i didn't have to specify:
" "filename": "./trait-layers/foreground/logo" " in incompatibilities section.
I'm not sure what i'm doing wrong.

@Jon-Becker
Copy link
Owner

Jon-Becker commented Apr 11, 2023

Seems like you have an extra comma on line 36 😀

You also have duplicate key "layer" twice in the incompatibilities section.

@CptJackieSparrow
Copy link
Author

Damn, sorry to even bother you man.
Ty for the awesome ultra quick reply.

@Jon-Becker
Copy link
Owner

No worries! Let me know if you need anything else 🦦❤️

@CptJackieSparrow
Copy link
Author

Hey man, i've did the incompatibilities as shown at top.
Do i have to manually enter each trait's compatibility? As in this list format, it doesn't exclude lists from list?

@Jon-Becker
Copy link
Owner

Correct, the value of an incompatibility cannot be a list as of this version. I can probably update it for you if you'd like

@CptJackieSparrow
Copy link
Author

Correct, the value of an incompatibility cannot be a list as of this version. I can probably update it for you if you'd like

Dude that’ll be terrific.
I’ve been manually making it for 3 days, but couldn’t even made it to half 😂

@CptJackieSparrow
Copy link
Author

Correct, the value of an incompatibility cannot be a list as of this version. I can probably update it for you if you'd like

Sorry to bother, though are you able to make the update Jon?

@Jon-Becker
Copy link
Owner

Hey! Will tackle this weekend. Sorry, been a bit busy!

@CptJackieSparrow
Copy link
Author

You da best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Something that could be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants