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

Keys that are just numbers get resolved as int and then trigger an attribute exception since int's are not str's #10

Open
CCP-Zeulix opened this issue Jun 3, 2024 · 0 comments

Comments

@CCP-Zeulix
Copy link
Contributor

That is to say, there's an assumption in the code that keys are str and thus errors like "int has no attribute startswith" and the likes.

Quick and easy to fix by just casting all keys to strings after they're read (although that's may not be optimal, because the code using Alviss to read yaml/json may be expecting int keys but now gets str and needs to cast to int... :-/

There's also a workaround where you just surround the key with quotes to force them to be a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant