"Keys Must Be Strings"

TIL Quenty is wise beyond his years.

2 Likes

I think this error is still very uninformative, it doesn’t tell you what the datastore that failed is, the line of code, the script, the value or the key. I get this error very often and it always takes me much longer to solve than all of the other errors I receive, mainly due to the fact that it’s so difficult to understand or locate the source of.

It also doesn’t seem to make much grammatical or logical sense, before finding this post I was very confused as to what the error actually meant, as it seems to contradict itself:

Cannot convert non-array or mixed tables: keys must be strings

The ‘keys must be strings’ part seems like its referencing the entire sentence coming before the colon, and since arrays cannot have strings as keys, it seems like a direct contradiction of itself. On top of that, it doesn’t say anything about the fact that the datastore will accept arrays, or dictionaries, but not a mixture. It actually says cannot convert non-array tables, making it sound like your data must be an array, when in fact it can be a string indexed dictionary.

1 Like

Let’s continue the discussion here, it encompasses more error messages and is more up to date, and is placed in the right category:

Could you repost your issue on there? Thanks!