diff --git a/constructor/conda_interface.py b/constructor/conda_interface.py index b66d3e32..d4081316 100644 --- a/constructor/conda_interface.py +++ b/constructor/conda_interface.py @@ -130,6 +130,9 @@ def get_repodata(url): "packages.conda": {}, "removed": [], } + elif isinstance(raw_repodata_str, dict): + # conda 26.x+ may return an already-parsed dict from fetch_latest() + full_repodata = raw_repodata_str else: full_repodata = json.loads(raw_repodata_str) diff --git a/news/1196-conda-26-fetch-latest-dict b/news/1196-conda-26-fetch-latest-dict new file mode 100644 index 00000000..a1af286e --- /dev/null +++ b/news/1196-conda-26-fetch-latest-dict @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Fix TypeError when conda 26.x returns dict from `fetch_latest()`. (#1196) + +### Deprecations + +* + +### Docs + +* + +### Other + +*