Collecting package metadata (repodata.json) failed

Hi all,
I am running a local galaxy installation (v23.1) on a Ubuntu 22.04.3 LTS workstation for a couple of months. Initial galaxy and package installation worked fine and I have been running several different analyses on the workstation. Recently I have tried to install new tools in admin → Install and Uninstall page. The status states “Installed” but checking in manage dependencies shows that the dependencies are not installed. The tools also do not run.
During installation and also during the attempted installation of unresolved dependencies I get the following error:

Upload successful.
Channels:
 - conda-forge
 - bioconda
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/exceptions.py", line 1132, in __call__
        return func(*args, **kwargs)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/cli/main.py", line 69, in main_subshell
        exit_code = do_call(args, p)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 122, in do_call
        return getattr(module, func_name)(args, parser)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/notices/core.py", line 121, in wrapper
        return func(*args, **kwargs)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/cli/main_create.py", line 41, in execute
        install(args, parser, 'create')
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/cli/install.py", line 264, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/core/solve.py", line 134, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/core/solve.py", line 177, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 178, in solve_final_state
        index = LibMambaIndexHelper(
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 114, in __init__
        self._index = self._load_channels()
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 228, in _load_channels
        jsons = {url: str(path) for (url, path) in executor.map(self._fetch_channel, urls)}
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 228, in <dictcomp>
        jsons = {url: str(path) for (url, path) in executor.map(self._fetch_channel, urls)}
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
        yield _result_or_cancel(fs.pop())
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
        return fut.result(timeout)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/concurrent/futures/_base.py", line 451, in result
        return self.__get_result()
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
        raise self._exception
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 213, in _fetch_channel
        subdir_data.load()
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/core/subdir_data.py", line 264, in load
        _internal_state = self._load()
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/core/subdir_data.py", line 315, in _load
        cache.load_state()  # XXX should this succeed even if FileNotFound?
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/gateways/repodata/__init__.py", line 570, in load_state
        self.load(state_only=True)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/site-packages/conda/gateways/repodata/__init__.py", line 528, in load
        state = json.loads(state_file.read())
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/json/__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "/home/di82das/galaxy/database/dependencies/_conda/lib/python3.10/json/decoder.py", line 340, in decode
        raise JSONDecodeError("Extra data", s, end)
    json.decoder.JSONDecodeError: Extra data: line 9 column 2 (char 292)

`$ /home/di82das/galaxy/database/dependencies/_conda/bin/conda create -y --quiet --solver libmamba --override-channels --channel conda-forge --channel bioconda --channel defaults --name mulled-v1-626bebf68a1e5297d7f14c239b62eb538e83ae29ac9804ffa05bf4174be98358 kallisto=0.48.0 samtools=1.14`

  environment variables:
                 CIO_TEST=<not set>
                  CONDARC=/home/di82das/galaxy/database/dependencies/_condarc
               CONDA_ROOT=/home/di82das/galaxy/database/dependencies/_conda
           CURL_CA_BUNDLE=<not set>
          LD_LIBRARY_PATH=/home/di82das/galaxy/.venv/lib/python3.10/site-packages/pylibmagic:
               LD_PRELOAD=<not set>
             LIBRARY_PATH=/home/di82das/galaxy/.venv/lib/python3.10/site-packages/pylibmagic:
                NODE_PATH=/home/di82das/galaxy/.venv/lib/node_modules
                     PATH=/home/di82das/galaxy/.venv/lib/node_modules/.bin:/home/di82das/galaxy/
                          .venv/bin:/home/di82das/galaxy/.venv/bin:/usr/local/sbin:/usr/local/bi
                          n:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
               PYTHONPATH=lib
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
         XRDP_SOCKET_PATH=/run/xrdp/sockdir

     active environment : None
       user config file : /home/di82das/galaxy/database/tmp/conda_exec_home_scyc727a/.condarc
 populated config files : /home/di82das/galaxy/database/dependencies/_conda/.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=11.4=0
                          __glibc=2.35=0
                          __linux=6.2.0=0
                          __unix=0=0
       base environment : /home/di82das/galaxy/database/dependencies/_conda  (writable)
      conda av data dir : /home/di82das/galaxy/database/dependencies/_conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/di82das/galaxy/database/dependencies/_conda/pkgs
                          /home/di82das/galaxy/database/tmp/conda_exec_home_scyc727a/.conda/pkgs
       envs directories : /home/di82das/galaxy/database/dependencies/_conda/envs
                          /home/di82das/galaxy/database/tmp/conda_exec_home_scyc727a/.conda/envs
               platform : linux-64
             user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Linux/6.2.0-36-generic ubuntu/22.04.3 glibc/2.35 solver/libmamba conda-libmamba-solver/23.3.0 libmambapy/1.4.2
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

Previously installed tools run just fine. I did not change anything on the Galaxy installation but updated Ubuntu during that time.

Any help on how to fix this is greatly appreciated!
Thanks a lot!

Hi @Ben

Maybe it is the tool itself. Which ToolShed repository is presenting with the error?

Hi @jennaj ,

Thanks you for your quick answer. this specific error message is when attempting to install [kallisto_quant] (Galaxy |).
I do get very similar error messages for the fresh installation of other tools or when I am trying to install the dependencies alone. So it seems to be a more systemic problem.

Cheers,
Ben

Here they propose a few ways to fix it, including some manual methods that may not be recommended but saves some reinstalling.

Still weird why this comes up after a few months but some people mention the same.

EDIT:

Looks like a common problem (with many different solutions)

Thanks for the links. I will try some of the things and report back!

I followed the suggestion in the first link to adjust some code in the subdir_data.py of conda. The error persists installing new tools or installing unresolved dependencies.

I then, as suggested in the second link, tried to locate a condarc. file but couldn’t find one. Reverting the conda version used does also not seem to be an option in the context of galaxy.

So, I am not sure how to proceed. I might have to export all histories, re-install the local Galaxy Server and import the histories. Or is there a better way to back up users and histories, set up a fresh installation of the local Galaxy Server and then restore only the user and user data?

Thank you for your help!

This seems very much conda-related problem so reinstalling Galaxy isn’t likely to help You can verify it by trying to install things with the same conda directly, without Galaxy. After verification I’d start with reinstalling Conda. Wiping Galaxy’s venv and clean reinstall of dependencies can’t hurt either.

Thank you for the tips! It took me a while to check everything.

First, I installed a package with the same Conda as installed in Galaxy and it worked. Then, I then re-installed Conda in the Galaxy folder, but when I am re-starting Galaxy and trying to install a dependency or a new package I get the same error. When I install Miniconda in a different folder I can also install tools.

In the end I backed up my histories, deleted the galaxy folder and made a fresh install. The fresh installation of the tolls worked without any problems.

Is there an easy way to just keep the users and user data while completely re-installing Galaxy?

Thanks again for all your help!

Users and all related things are in the database and actual datasets are on disk under path admin configured, by default that would likely be galaxy_dir/database/objects.

But again, this is not likely related to Galaxy’s codebase so wiping out the python virtual environment would probably suffice.