-
Notifications
You must be signed in to change notification settings - Fork 375
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
micromamba self-update
unnecessarily errors with libmamba Could not lock non-existing path '/Users/home/micromamba/conda-meta'
#3734
Comments
micromamba self-update
errors with libmamba Could not lock non-existing path '/Users/home/micromamba/conda-meta'
micromamba self-update
unnecessarily errors with libmamba Could not lock non-existing path '/Users/home/micromamba/conda-meta'
@jjerphan Agree reproducibility is gonna be hard here, so the general lesson is maybe to provide a few more details for errors in such cases, so one can try to find out what happened nonetheless, e.g. a stacktrace. |
I had a look at the micromamba self-update command and found something that looks relevant: mamba/micromamba/src/update.cpp Lines 67 to 74 in 31b2347
The comment suggests this is a bit of a hack/shim to allow micromamba self-update to reuse existing functionality that requires a root prefix (micromamba doesn't but the mamba does). So it looks like this is a reproducible bug: if the dir is not there, the error happens (I'll try to repro later). An easy hack/fix would be to create that directory if not present. Something like: // Ensure conda-meta folder exists
fs::u8path conda_meta_path = ctx.prefix_params.target_prefix / "conda-meta";
if (!fs::exists(conda_meta_path))
{
fs::create_directories(conda_meta_path);
} |
Yes, thank you for the suggestion. We can add a text field in |
Ah we're at cross-purposes, sorry I wasn't clear. I meant that the error message could be more informative - this is an unhandled error, it shouldn't really happen. What wew do in Nextstrain ecosystem is to print a stacktrace and suggest that users open an issue with it so that unhandled errors can be handled appropriately. One could insert a backtrace here: mamba/micromamba/src/update.cpp Lines 192 to 195 in 31b2347
void* array[10];
size_t size;
// Get the stack trace
size = backtrace(array, 10);
// Print the stack trace to stderr
backtrace_symbols_fd(array, size, STDERR_FILENO); |
Good news, I couldn't reproduce this on stock ubuntu docker image like this:
then inside this all works as expected: apt-get update && apt-get install -y \
curl \
ca-certificates \
tar \
xz-utils \
bzip2 \
file \
zsh \
&& apt-get clean
export VERSION=2.0.2-0
bash -c "$(curl -L micro.mamba.pm/install.sh)"
source ~/.bashrc
micromamba --version
micromamba self-update
micromambaa --version So it must be something weird with my zshrc setup or mac specific. |
Yes, from memory you have had several installation and shell initialization, so you better see whether this error is due to your setup before open issues. I opened #3752 anyway. |
This should have been fixed by #3572, see #3752 (review) for context. Feel free to reopen if you still have the issue. |
Troubleshooting docs
Anaconda default channels
How did you install Mamba?
Micromamba
Search tried in issue tracker
self-update
Latest version of Mamba
Tried in Conda?
I didn't try
Describe your issue
When doing
micromamba self-update
(on version 2.0.2) I get an error, even though the update succeeds. So a false-positive error. The update code seems to assume something that isn't true in my case:Actually, the update seems to have worked, despite the error. I only just found out while filing the issue. It's still a bug :)
mamba info / micromamba info
Logs
~/.condarc
~/.mambarc
The text was updated successfully, but these errors were encountered: