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

[Bug]: Numeric character weight value breaks import of Alchemy-formatted JSON #53

Closed
1 task done
djeglin opened this issue Oct 9, 2023 · 3 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@djeglin
Copy link

djeglin commented Oct 9, 2023

What happened?

When attempting to directly import the below character, Alchemy would throw an error and refuse to import the character. I had a look at the manual route and found that the JSON converts just fine, but when trying to import the Alchemy-formatted JSON into Alchemy itself, it would throw an error because I had a numeric value in the character weight field, and Alchemy is expecting a string.

Manually editing the JSON to ensure the weight is wrapped in quotes to force it to a string fixed the issue, so I imagine that the same treatment is needed in the converter itself to ensure that this doesn't happen. If we make sure that we caste any value imported here as a string (String(value)) then that should catch situations where there is a number type in the field.

D&D Beyond Character Link

https://www.dndbeyond.com/characters/7988555/5uCKLU

Alchemy Version

0.213.0 (efd506d7a1)

Alchemy User Agent

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Alchemy/1.2.0 Chrome/112.0.5615.50 Electron/24.1.1 Safari/537.36

Code of Conduct

  • I agree to follow this project's Code of Conduct
@djeglin djeglin added the bug Something isn't working label Oct 9, 2023
@voidrender
Copy link
Member

This was fixed in #55 but has not yet been pulled into Alchemy.

@voidrender
Copy link
Member

I just opened a PR in the Alchemy codebase to bring this fix in. I will report back when it's live.

@voidrender
Copy link
Member

This is fixed in Alchemy now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants