CRASH value must be dictionary in property tree at root

Place to get help with not working mods / modding interface.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

I am trying to create my first mod. I went to the wiki page copied and pasted everything to see the tutorial mods code, and how it worked. and I get value must be dictionary in property tree at root every time I launch with the mod in my mods folder. I saw someone on here said the mods-list.json is corrupted, but I already tried deleting it, and letting the game re-create it, but it won't even recreate it until I remove the mod from the folder. Nothing in the wiki page states why this error occurs so I have no idea what is wrong with the tutorial mod.

P.S. I have programmed in C++ so I'm not new to programming I just need info on what the errors are trying to say.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: CRASH value must be dictionary in property tree at root

Post by Deadlock989 »

Usually that error means you have assigned an unexpected value to a prototype field that expects the value to be one from a list of acceptable strings (i.e. the "dictionary"). For example, energy_source.type can only be "burner" or "electric" or "heat", it can't be "burners" or "electrickery" or "wildebeest".

Without seeing your code, or the error, or the line number given, it's impossible to tell exactly what.

It's not a crash.
Last edited by Deadlock989 on Thu May 03, 2018 11:03 pm, edited 1 time in total.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

this is my code
https://wiki.factorio.com/Tutorial:Modd ... al/Gangsir
like I said. I copied it straight from the tutorial to get an idea of how mods work I literally just copied and pasted the sections they showed
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: CRASH value must be dictionary in property tree at root

Post by Deadlock989 »

There's a whole bunch of stuff on that page. People can help if you post the actual code the game is trying to run.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: CRASH value must be dictionary in property tree at root

Post by Deadlock989 »

wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
... Charming. Well, that's the last time I try and help a noob.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

Deadlock989 wrote:
wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
... Charming. Well, that's the last time I try and help a noob.

coming from the person who didn't read for 2 seconds you didn't help anyone you wasted my time
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by orzelek »

2 things:
1. When asking for help presenting what you want help with would be really nice. Pasting link to whole tutorial.. is not that helpful. And it doesn't really answer question what code are you trying to run.
2. Game changes and tutorial might have gotten outdated - my guess would be that some prototype parmeters have changed. Without knowing actual code it's hard to help unless we owuld try to do the tutorial - and still no guearantee that we would encounter the same issue then.

PS.
@Deadlock989 You are becoming less and less patient :P
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by Nexela »

orzelek wrote:2 things:
PS.
@Deadlock989 You are becoming less and less patient :P
I Agree, and I LIKE IT
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by Optera »

Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club. ;)
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by Bilka »

Optera wrote:Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club. ;)
Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for me :P
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by bobingabout »

Bilka wrote:
Optera wrote:Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club. ;)
Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for me :P
I've actually had people tell me just how much they hate you, because when they ask for help, you just respond with a wiki link.

come to think of it, that's why deadlock dropped out of this topic, isn't it? the person asking for help just linked a wiki page.


But yeah, If the OP (original poster) wants to either zip the mod and upload it somewhere and post a link, or put the code on pastebin or even github (you know I hate github), then I'll take a look and point out any issues I notice.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by Bilka »

bobingabout wrote:I've actually had people tell me just how much they hate you, because when they ask for help, you just respond with a wiki link.
That's news to me, thanks for telling me; I'll copy paste the answer from the wiki from now on. That will be just as fast for me and hopefully more helpful for people who dont like to read the wiki.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by Aeternus »

wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
On the contrary, you've got someone willing to help, wanting to verify that you didn't mess up in that copy/paste you have done (something as simple as copying a dot that isn't supposed to be included or something can mess up code) and your response is, well... self-entitled.
If you did that copy/paste once, what's the effort of doing it again, from your code text snipplet into the text field for this forum?

Bottom line, without -your- code, not the example on the wiki but whatever you interpreted from it, we cannot help. Open your source!
posila
Factorio Staff
Factorio Staff
Posts: 5406
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by posila »

The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

posila wrote:The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
Thank you for being the first helpful post I will go back and look at the info.json file
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

Thank you @posila I found out the problem. I had capitalized the "Description" because I'm use to camel casing programming. Once I removed the capital it worked, thank you so much for actually being helpful.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by eradicator »

posila wrote:The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
You should really force the next newcomer/trainee to include proper error messages for the info.json stage. I've seen far too many threads of people having hidden errors with that silently fail or w/e. And while they're at it might as well add errors to changelog.txt parsing :P

@bob: What's wrong with github & you? :D (Link to answer is fine :P)
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: CRASH value must be dictionary in property tree at root

Post by Deadlock989 »

So, to summarise, the OP had in fact changed what they had copy-pasted, but threw a strop when asked to post the actual code being used, instead of just vague links to a years-old wall of text that they'd screwed up anyway.

And it turned out to be that actually, they had changed the value of a field which expects specific values. Which is literally the very first answer given to him by yours truly.

They do say that no good deed goes unpunished.
wrathofbong46290
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu May 03, 2018 10:04 pm
Contact:

Re: CRASH value must be dictionary in property tree at root

Post by wrathofbong46290 »

Deadlock989 wrote:So, to summarise, the OP had in fact changed what they had copy-pasted, but threw a strop when asked to post the actual code being used, instead of just vague links to a years-old wall of text that they'd screwed up anyway.

And it turned out to be that actually, they had changed the value of a field which expects specific values. Which is literally the very first answer given to him by yours truly.

They do say that no good deed goes unpunished.
Funny your still here complaning, and I know your not comptent to notice, and I know your as new to reading as I am to LUA, but if you read for 2 seconds you notice he told me where my problem was and I fixed it. If you were comptent to tell me what he did on your first msg. There would of only needed to have been 1 reply. You really are something special
Post Reply

Return to “Modding help”