You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ conda-lock lock -f bad-name.yaml
Locking dependencies for ['linux-64']...
INFO:conda_lock.conda_solver:linux-64 using specs ['not-a-real-package']
Traceback (most recent call last):
File "/Users/willholtz/.local/bin/conda-lock", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1402, in lock
lock_func(
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1110, in run_lock
make_lock_files(
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 393, in make_lock_files
fresh_lock_content = create_lockfile_from_spec(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 836, in create_lockfile_from_spec
deps = _solve_for_arch(
^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 748, in _solve_for_arch
conda_deps = solve_conda(
^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 160, in solve_conda
dry_run_install = solve_specs_for_arch(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 396, in solve_specs_for_arch
return _reconstruct_fetch_actions(conda, platform, dryrun_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/willholtz/.local/pipx/venvs/conda-lock/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 252, in _reconstruct_fetch_actions
if "LINK" not in dry_run_install["actions"]:
~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'actions'
That error wasn't very helpful. I dropped into the python debugger, and then I could see:
(Pdb) dry_run_install["error"]
"PackagesNotFoundError: The following packages are not available from current channels:\n\n - not-a-real-package\n\nCurrent channels:\n\n - https://conda.anaconda.org/conda-forge\n - file:///var/folders/qq/q46r86t55t382q18lcxtk2tw0000gp/T/tmpqf06wj8e\n\nTo search for alternate channels that may provide the conda package you're\nlooking for, navigate to\n\n https://anaconda.org\n\nand use the search bar at the top of the page.\n"
Why is this needed?
Make it easier to realize that you made a typo in a package name.
What should happen?
Display dry_run_install["error"] to the user.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Checklist
What is the idea?
Currently, if I try to lock the following:
the output is:
That error wasn't very helpful. I dropped into the python debugger, and then I could see:
Why is this needed?
Make it easier to realize that you made a typo in a package name.
What should happen?
Display
dry_run_install["error"]
to the user.Additional Context
No response
The text was updated successfully, but these errors were encountered: