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

core/config.py parse_number fails on 'Infinity' #439

Open
MikeJeffers opened this issue Feb 28, 2020 · 1 comment
Open

core/config.py parse_number fails on 'Infinity' #439

MikeJeffers opened this issue Feb 28, 2020 · 1 comment
Labels
bug Bug fixes

Comments

@MikeJeffers
Copy link
Contributor

MikeJeffers commented Feb 28, 2020

https://github.com/voxel51/eta/blob/develop/eta/core/config.py#L461
Throws error if presented with "Infinity" string the result of json.dumps({"key": float("inf")} or "inf" the result of serializing python's float('inf').
This used to work! Not sure what changed..

@MikeJeffers MikeJeffers added the bug Bug fixes label Feb 28, 2020
@brimoor
Copy link
Contributor

brimoor commented Mar 4, 2020

I can't seem to reproduce this. The following works as expected for me:

import json
from eta.core.config import Config

d = {"key": float("inf")}
print(Config.parse_number(d, "key"))

d2 = json.loads(json.dumps(d))
print(Config.parse_number(d2, "key"))

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

No branches or pull requests

2 participants