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
cast key to string #46
Conversation
In some cases the key is a boolean value not a string. A keyerror is produced when a boolean value appears in key.
@a246530 Feels safe, merging. Do you have a mini test case you could share here for reference? |
@a246530 To clarify I'm just curious how a boolean got in there, making sure the report data is fine with other datatypes, and could be a useful test case for future extensions. |
@fbdesignpro it does appear to fix #40 as well. |
@a246530 ouch; does it happen everywhere or only with that problem data? |
Just around the data fields that had the key value as boolean. |
ok phew; if it's possible, definitely send a test here, I'll check it out when I have a minute (hopefully soon!) Thank you!! |
I think I got it, 904a11a should take care of it. |
Ahh yea, sorry about that. Originally i had an if statement that checked it it was bool but your fix in 904a11a looks better. |
In some cases the key is a boolean value not a string. A keyerror is produced when a boolean value appears in key. Reference #42
I was able to recreate the issue as user described and was able to fix by casting key as string. It seems like the key should always be a string.