BUG: config class "__repr__": not JSON serializable
- Dominant language
- Python
- Stars
- 124
- Forks
- 46
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 6
Description
In the class Config:
```
def __repr__(self):
return json.dumps(Config._cfg)
```
However, this conflicts with:
```
@property
def bool_names(self):
if "bool_names" in Config._cfg:
names = Config._cfg["bool_names"]
else:
names = (b"FALSE", b"TRUE") ## <-- this causes error
return names
```
The byte type is not JSON serializable.
Therefore, the error is triggered each time when __repr__ is called, e.g. print
This bug causes the dysfunction of h5pyd.get_config, e.g.
`h5pyd.get_config( config_file= "./data/hsds.server.hscfg" ) `
suggested solution: either remove the byte data field or use the Python built-in True/False data type
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.