voxel51/eta

core/config.py parse_number fails on 'Infinity'

Opened this issue · 1 comments

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..

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"))