CRASH value must be dictionary in property tree at root
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
CRASH value must be dictionary in property tree at root
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.
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.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: CRASH value must be dictionary in property tree at root
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.
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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
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
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
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: CRASH value must be dictionary in property tree at root
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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
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.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: CRASH value must be dictionary in property tree at root
... Charming. Well, that's the last time I try and help a noob.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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
Deadlock989 wrote:... Charming. Well, that's the last time I try and help a noob.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.
coming from the person who didn't read for 2 seconds you didn't help anyone you wasted my time
Re: CRASH value must be dictionary in property tree at root
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
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
Re: CRASH value must be dictionary in property tree at root
I Agree, and I LIKE ITorzelek wrote:2 things:
PS.
@Deadlock989 You are becoming less and less patient
Re: CRASH value must be dictionary in property tree at root
Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club.
Welcome to the club.
My Mods: mods.factorio.com
Re: CRASH value must be dictionary in property tree at root
Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for meOptera 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
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.Bilka wrote:Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for meOptera 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.
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.
Re: CRASH value must be dictionary in property tree at root
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.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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: CRASH value must be dictionary in property tree at root
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.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.
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!
Re: CRASH value must be dictionary in property tree at root
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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
Thank you for being the first helpful post I will go back and look at the info.json fileposila 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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
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.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: CRASH value must be dictionary in property tree at root
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 :Pposila 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.
@bob: What's wrong with github & you? :D (Link to answer is fine :P)
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: CRASH value must be dictionary in property tree at root
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.
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.
-
- Burner Inserter
- Posts: 8
- Joined: Thu May 03, 2018 10:04 pm
- Contact:
Re: CRASH value must be dictionary in property tree at root
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 specialDeadlock989 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.