Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - conda-store cli solve errors #1014

Closed
soapy1 opened this issue Dec 9, 2024 · 1 comment
Closed

[BUG] - conda-store cli solve errors #1014

soapy1 opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
area: api 🌐 type: bug 🐛 Something isn't working

Comments

@soapy1
Copy link
Contributor

soapy1 commented Dec 9, 2024

Describe the bug

The conda-store solve command no longer works. It looks like this is issue as to do with how arguments are parsed from the api. This is the error message from the worker:

conda-store-worker-1  |     raise CalledProcessError(
conda-store-worker-1  | conda_lock._vendor.poetry.utils._compat.CalledProcessError: Command '['/opt/conda/condabin/mamba', 'create', '--prefix', '/tmp/tmp_um_8gjw/prefix', '--dry-run', '--json', '--strict-channel-priority', '--override-channels', '--channel', 'conda-forge', '--channel', 'file:///tmp/tmpullrdz_h', 'python 3.12', 'flask/', 'ipykernel', 'pip *']' returned non-zero exit status 1.
conda-store-worker-1  | [2024-12-09 20:04:43,404: INFO/Beat] Scheduler: Sending due task watch-paths (task_watch_paths)

Expected behavior

The environment is solved and conda-store returns the list of packages in the environment.

How to Reproduce the problem?

For an environment.yaml, for example

# env.yaml
name: python-flask-env
channels:
  - conda-forge
dependencies:
  - python ==3.12
  - flask

Try to use the cli to submit a solve

$ conda-store solve env.yaml

Output

Output is an error

  File "/home/sophia/miniconda3/envs/conda-store-server-dev/bin/conda-store", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/sophia/projects/conda-store/conda-store/conda_store/__main__.py", line 43, in main
    cli()
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/projects/conda-store/conda-store/conda_store/_internal/utils.py", line 25, in wrapper
    return asyncio.run(f(*args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/sophia/projects/conda-store/conda-store/conda_store/_internal/cli.py", line 307, in solve_environment
    packages = await conda_store.solve_environment(**arguments)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/projects/conda-store/conda-store/conda_store/api.py", line 179, in solve_environment
    return (await response.json())["solve"]
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/sophia/miniconda3/envs/conda-store-server-dev/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1277, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 500, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url='http://localhost:8080/conda-store/api/v1/specification/?channels=conda-forge&conda=python+%3D%3D3.12&conda=flask/'

Versions and dependencies used.

No response

Anything else?

No response

@soapy1 soapy1 added area: api 🌐 type: bug 🐛 Something isn't working labels Dec 9, 2024
@soapy1 soapy1 self-assigned this Dec 9, 2024
@soapy1 soapy1 moved this from New 🚦 to TODO 📬 in conda-store 🐍 Dec 10, 2024
@soapy1
Copy link
Contributor Author

soapy1 commented Dec 10, 2024

Looking more into this issues, there seems to be a whole can of problems to resolve in order to fully fix this issue. Since we are actively working on designing a new cli, we are going to choose to not fix this issue.

@soapy1 soapy1 closed this as completed Dec 10, 2024
@github-project-automation github-project-automation bot moved this from TODO 📬 to Done 💪🏾 in conda-store 🐍 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api 🌐 type: bug 🐛 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant