emscripten-forge / recipes

Recipes to build the packages for the emscripten-forge distribution
BSD 3-Clause "New" or "Revised" License
52 stars 40 forks source link

Installing latest ipython release (8.24.0) causes conda validation error: 'emscripten' is not a valid Platform #927

Open LiamBindle opened 2 months ago

LiamBindle commented 2 months ago

Hi all,

First off, thank you so much for all your work. We're using emscripten-forge in combination with voici with great success.

In the last week or two my voici builds started to fail with the error message below after the following command is executed (inside voici build).

$ conda install --yes --prefix /tmp/tmpp51ds5r2/env/envs/voici -c https://repo.mamba.pm/emscripten-forge -c conda-forge xeus-python pandas ipyleaflet ipywidgets pystac urllib3>=2.2 requests matplotlib plotly openpyxl pip

...

 >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/cli/main.py", line 83, in main_subshell
        exit_code = do_call(args, parser)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 196, in do_call
        result = getattr(module, func_name)(args, parser)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/notices/core.py", line 124, in wrapper
        return func(*args, **kwargs)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/cli/main_install.py", line 140, in execute
        return install(args, parser, "install")
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/cli/install.py", line 438, in install
        handle_txn(unlink_link_transaction, prefix, args, newenv)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/cli/install.py", line 456, in handle_txn
        unlink_link_transaction.print_transaction_summary()
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/link.py", line 1217, in print_transaction_summary
        legacy_action_groups = self._make_legacy_action_groups()
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/link.py", line 1197, in _make_legacy_action_groups
        self._pfe.prepare()
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/common/io.py", line 85, in decorated
        return f(*args, **kwds)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 746, in prepare
        self.paired_actions.update(
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 747, in <genexpr>
        (prec, self.make_actions_for_record(prec)) for prec in largest_first
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 591, in make_actions_for_record
        extracted_pcrec = next(
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 592, in <genexpr>
        (
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 595, in <genexpr>
        PackageCacheData(pkgs_dir).query(pref_or_spec)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 162, in query
        for pcrec in self._package_cache_records.values()
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 302, in _package_cache_records
        self.load()
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 123, in load
        package_cache_record = self._make_single_record(base_name)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 460, in _make_single_record
        package_cache_record = PackageCacheRecord.from_objects(
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 793, in from_objects
        return cls(**init_vars)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 746, in __call__
        instance = super().__call__(*args, **kwargs)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/models/records.py", line 421, in __init__
        super().__init__(*args, **kwargs)
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 762, in __init__
        setattr(self, key, kwargs[key])
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 431, in __set__
        self.box(instance, instance.__class__, val),
      File "/home/liam/scratch/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 573, in box
        raise ValidationError(val, msg=e1)
    conda.auxlib.exceptions.ValidationError: 'emscripten' is not a valid Platform

...

After this error, all of my conda install and conda create commands start to fail (even in different environments). I tried reinstalling conda as well as updating to the latest version of conda (24.4 as of writing).

Troubleshooting

I added a print line at package_cache_data.py:123 (which is self._make_single_record(base_name) according to the traceback above) and found that this validation error is triggered when base_name="ipython-8.24.0-py311h43c7e2a_1". That made me think that perhaps the latest emscripten-forge release of ipython is buggy so I tried pinning ipython to 8.23.0 and that fixed the issue.

TLDR: Installing ipython 8.24.0 causes conda.auxlib.exceptions.ValidationError: 'emscripten' is not a valid Platform. Installing ipython 8.23.0 works ok.

Thanks in advance.

LiamBindle commented 2 months ago

Pinging @DerThorsten because I see that you've been working on the ipython recipe lately. Do you have any insight?

DerThorsten commented 1 month ago

the plattform was renamed to emscripten-wasm32 a long long while ago, could it be that your setup is very old/outdated? @atrawog could it be that the recent quetz updated removed the old emscripten platform? there used to be repodata at https://repo.mamba.pm/emscripten-forge/emscripte/repodata.json but there isn't anymore

LiamBindle commented 1 month ago

I believe everything I'm using is up to date, and I see emscripten-wasm32 being used everywhere. I'm not sure where the emscripten is coming from but this error is continuing to happen when I try to use a package from https://repo.mamba.pm/emscripten-forge with a release since approximately the first week of May.

DerThorsten commented 1 month ago

can you try to use micromamba instead of conda. With conda the platform is probably somewhere in a .condarc file. This file probably still has an "emscripten" instead of emscripten-wasm32.

With micromamba you can just specify --platform=emscripten-wasm32

DerThorsten commented 1 month ago

a

can you try to use micromamba instead of conda. With conda the platform is probably somewhere in a .condarc file. This file probably still has an "emscripten" instead of emscripten-wasm32.

With micromamba you can just specify --platform=emscripten-wasm32

actually, the issue is in the rattler-build which writes the wrong platform to the packages. Now that we know the source of the issue, we working on a fix.

LiamBindle commented 1 month ago

Terrific! Thanks so much @DerThorsten!