Skip to content

Commit 4195f41

Browse files
committed
BUG: Fix pd.show_versions as_json invalid JSON (pandas-dev#39701)
1 parent bcf2406 commit 4195f41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/util/_print_versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def show_versions(as_json: Union[str, bool] = False) -> None:
107107
j = {"system": sys_info, "dependencies": deps}
108108

109109
if as_json is True:
110-
print(j)
110+
print(json.dumps(j))
111111
else:
112112
assert isinstance(as_json, str) # needed for mypy
113113
with codecs.open(as_json, "wb", encoding="utf8") as f:

0 commit comments

Comments
 (0)