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

RuntimeError: Could not set URL #2714

Closed
stammler opened this issue Jul 27, 2023 · 6 comments
Closed

RuntimeError: Could not set URL #2714

stammler opened this issue Jul 27, 2023 · 6 comments

Comments

@stammler
Copy link

I keep getting an error on a repository that used to work previously: github.com/stammler/spp1992_summerschool23.

Click here to reproduce:
Binder

This is from the build log:

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

    Traceback (most recent call last):
      File "/srv/conda/lib/python3.11/site-packages/conda/exception_handler.py", line 16, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/main.py", line 49, in do_call
        exit_code = getattr(module, func_name)(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/srv/conda/lib/python3.11/site-packages/conda/notices/core.py", line 123, in wrapper
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/main_update.py", line 139, in execute
        result[installer_type] = installer.install(prefix, specs, args, env)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/srv/conda/lib/python3.11/site-packages/mamba/mamba_env.py", line 153, in mamba_install
        transaction.fetch_extract_packages()
    RuntimeError: Could not set URL (code: 14 - url = /wheel-0.40.0-pyhd8ed1ab_0.conda)

`$ /srv/conda/bin/mamba update -p /srv/conda/envs/notebook --file environment.yml`

  environment variables:
                 CIO_TEST=<not set>
  CONDA_AUTO_UPDATE_CONDA=false
        CONDA_DEFAULT_ENV=/srv/conda/envs/notebook
                CONDA_DIR=/srv/conda
           CONDA_PLATFORM=linux-64
               CONDA_ROOT=/srv/conda
           CURL_CA_BUNDLE=<not set>
               LD_PRELOAD=<not set>
                     PATH=/home/jovyan/.local/bin:/home/jovyan/.local/bin:/srv/conda/envs/notebo
                          ok/bin:/srv/conda/bin:/srv/npm/bin:/usr/local/sbin:/usr/local/bin:/usr
                          /sbin:/usr/bin:/sbin:/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : None
       user config file : /home/jovyan/.condarc
 populated config files : /srv/conda/.condarc
          conda version : 23.5.2
    conda-build version : not installed
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.27=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /srv/conda  (writable)
      conda av data dir : /srv/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://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 : /srv/conda/pkgs
                          /home/jovyan/.conda/pkgs
       envs directories : /srv/conda/envs
                          /home/jovyan/.conda/envs
               platform : linux-64
             user-agent : conda/23.5.2 requests/2.31.0 CPython/3.11.4 Linux/5.15.0-69-generic ubuntu/18.04.6 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


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

time: 47.398
Removing intermediate container 75ebb7066260
The command '/bin/sh -c TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '' returned a non-zero code: 1

I cannot make sense of it. Is that a problem on my side?
Or is there an issue with Binder right now, which is out of my control?

Many thanks in advance!

@welcome
Copy link

welcome bot commented Jul 27, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@manics
Copy link
Member

manics commented Jul 27, 2023

It's possible it's a bug in conda/mamba, which were recently updated in https://github.com/jupyterhub/repo2docker/pull/1299/files

Can you reproduce the error with the dev version of repo2docker installed from thre main branch? Does the last tagged release work? https://github.com/jupyterhub/repo2docker/tags

@rgaiacs
Copy link
Collaborator

rgaiacs commented Aug 21, 2023

The same is happening with https://github.com/gesiscss/css_methods_python

Full build log

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockercrurfb71'...
Updating files:  44% (74/166)
Updating files:  45% (75/166)
Updating files:  46% (77/166)
Updating files:  47% (79/166)
Updating files:  48% (80/166)
Updating files:  49% (82/166)
Updating files:  50% (83/166)
Updating files:  51% (85/166)
Updating files:  52% (87/166)
Updating files:  53% (88/166)
Updating files:  54% (90/166)
Updating files:  55% (92/166)
Updating files:  56% (93/166)
Updating files:  57% (95/166)
Updating files:  58% (97/166)
Updating files:  59% (98/166)
Updating files:  59% (99/166)
Updating files:  60% (100/166)
Updating files:  61% (102/166)
Updating files:  62% (103/166)
Updating files:  63% (105/166)
Updating files:  64% (107/166)
Updating files:  65% (108/166)
Updating files:  66% (110/166)
Updating files:  67% (112/166)
Updating files:  68% (113/166)
Updating files:  69% (115/166)
Updating files:  70% (117/166)
Updating files:  71% (118/166)
Updating files:  72% (120/166)
Updating files:  73% (122/166)
Updating files:  74% (123/166)
Updating files:  75% (125/166)
Updating files:  76% (127/166)
Updating files:  77% (128/166)
Updating files:  78% (130/166)
Updating files:  79% (132/166)
Updating files:  80% (133/166)
Updating files:  81% (135/166)
Updating files:  82% (137/166)
Updating files:  83% (138/166)
Updating files:  84% (140/166)
Updating files:  85% (142/166)
Updating files:  86% (143/166)
Updating files:  87% (145/166)
Updating files:  88% (147/166)
Updating files:  89% (148/166)
Updating files:  90% (150/166)
Updating files:  91% (152/166)
Updating files:  92% (153/166)
Updating files:  93% (155/166)
Updating files:  94% (157/166)
Updating files:  95% (158/166)
Updating files:  96% (160/166)
Updating files:  96% (161/166)
Updating files:  97% (162/166)
Updating files:  98% (163/166)
Updating files:  99% (165/166)
Updating files: 100% (166/166)
Updating files: 100% (166/166), done.
HEAD is now at 481fd88 Update README.md
Building conda environment for python=3.9
Using CondaBuildPack builder
Step 1/50 : FROM docker.io/library/buildpack-deps:bionic
 ---> 0f137f206fa8
Step 2/50 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 6e4965def8f8
Step 3/50 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends locales > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> a9807201b785
Step 4/50 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen &&     locale-gen
 ---> Using cache
 ---> fa35955eae00
Step 5/50 : ENV LC_ALL=en_US.UTF-8     LANG=en_US.UTF-8     LANGUAGE=en_US.UTF-8
 ---> Using cache
 ---> 3fa7db7aba27
Step 6/50 : ENV SHELL=/bin/bash
 ---> Using cache
 ---> a628f25290d0
Step 7/50 : ARG NB_USER
 ---> Using cache
 ---> bb7fc95b5b7f
Step 8/50 : ARG NB_UID
 ---> Using cache
 ---> 26a1912a03ee
Step 9/50 : ENV USER=${NB_USER}     HOME=/home/${NB_USER}
 ---> Using cache
 ---> 9f68d60ba8c1
Step 10/50 : RUN groupadd         --gid ${NB_UID}         ${NB_USER} &&     useradd         --comment "Default user"         --create-home         --gid ${NB_UID}         --no-log-init         --shell /bin/bash         --uid ${NB_UID}         ${NB_USER}
 ---> Using cache
 ---> ab7ff1751ef1
Step 11/50 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends        gettext-base        less        unzip        > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 9e1b8039cd59
Step 12/50 : EXPOSE 8888
 ---> Using cache
 ---> f9b5ef5e3083
Step 13/50 : ENV APP_BASE=/srv
 ---> Using cache
 ---> 64bdaf521b13
Step 14/50 : ENV CONDA_DIR=${APP_BASE}/conda
 ---> Using cache
 ---> a4c7a150df6e
Step 15/50 : ENV NB_PYTHON_PREFIX=${CONDA_DIR}/envs/notebook
 ---> Using cache
 ---> de47c1d216a9
Step 16/50 : ENV NPM_DIR=${APP_BASE}/npm
 ---> Using cache
 ---> 2c9160df334c
Step 17/50 : ENV NPM_CONFIG_GLOBALCONFIG=${NPM_DIR}/npmrc
 ---> Using cache
 ---> 00e06c0cc7a5
Step 18/50 : ENV NB_ENVIRONMENT_FILE=/tmp/env/environment.lock
 ---> Using cache
 ---> 878088b22e6b
Step 19/50 : ENV MAMBA_ROOT_PREFIX=${CONDA_DIR}
 ---> Using cache
 ---> 9cca0c5b561c
Step 20/50 : ENV MAMBA_EXE=${CONDA_DIR}/bin/mamba
 ---> Using cache
 ---> 8a147757acd7
Step 21/50 : ENV CONDA_PLATFORM=linux-64
 ---> Using cache
 ---> 344d72c7e2a4
Step 22/50 : ENV KERNEL_PYTHON_PREFIX=${NB_PYTHON_PREFIX}
 ---> Using cache
 ---> d0017cf8d635
Step 23/50 : ENV PATH=${NB_PYTHON_PREFIX}/bin:${CONDA_DIR}/bin:${NPM_DIR}/bin:${PATH}
 ---> Using cache
 ---> c58d50aae961
Step 24/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-44e764 /etc/profile.d/activate-conda.sh
 ---> Using cache
 ---> 0b17568b0070
Step 25/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2fenvironment-2epy-2d3-2e9-2dlinux-2d64-2elock-3652dd /tmp/env/environment.lock
 ---> Using cache
 ---> 61b0b61b19dc
Step 26/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2finstall-2dbase-2denv-2ebash-e5509f /tmp/install-base-env.bash
 ---> Using cache
 ---> 1695ebbc634f
Step 27/50 : RUN TIMEFORMAT='time: %3R' bash -c 'time /tmp/install-base-env.bash' && rm -rf /tmp/install-base-env.bash /tmp/env
 ---> Using cache
 ---> 9e079ffb58e1
Step 28/50 : RUN mkdir -p ${NPM_DIR} && chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
 ---> Using cache
 ---> e696839c9ec2
Step 29/50 : USER root
 ---> Using cache
 ---> c306d40887dd
Step 30/50 : ARG REPO_DIR=${HOME}
 ---> Using cache
 ---> a386c93bebac
Step 31/50 : ENV REPO_DIR=${REPO_DIR}
 ---> Using cache
 ---> 4988c2d8f8d3
Step 32/50 : RUN if [ ! -d "${REPO_DIR}" ]; then         /usr/bin/install -o ${NB_USER} -g ${NB_USER} -d "${REPO_DIR}";     fi
 ---> Using cache
 ---> 2d08f3a0929a
Step 33/50 : WORKDIR ${REPO_DIR}
 ---> Using cache
 ---> 2cb12d17a38c
Step 34/50 : RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR}
 ---> Using cache
 ---> 82c3de0bfd7b
Step 35/50 : ENV PATH=${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH}
 ---> Using cache
 ---> 084587a8f72a
Step 36/50 : ENV CONDA_DEFAULT_ENV=${KERNEL_PYTHON_PREFIX}
 ---> Using cache
 ---> bafbebf82055
Step 37/50 : COPY --chown=1000:1000 src/binder/environment.yml ${REPO_DIR}/binder/environment.yml
 ---> Using cache
 ---> 73d4c94e2b5e
Step 38/50 : USER ${NB_USER}
 ---> Using cache
 ---> d8b9407739e6
Step 39/50 : RUN TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "binder/environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '
 ---> Running in d49ceb6301e1


Looking for: ['beautifulsoup4=4.11.1', 'emoji=2.2.0', 'factor-analyzer=0.4.1', 'feedparser=6.0.8', 'gensim=4.1.2', 'ipywidgets=7.6.5', 'matplotlib=3.5.2', 'networkx=2.8.4', 'nltk=3.7', 'numpy=1.21.5', 'openpyxl=3.0.10', 'pandas=1.4.4', 'pip=22.2.2', 'powerlaw=1.4.6', 'pygraphviz=1.9', 'pyldavis=3.4.1', 'python=3.9.13', 'requests=2.28.1', 'scikit-learn=1.0.2', 'scipy=1.9.1', 'seaborn=0.11.2', 'selenium=3.9.0', 'spacy=3.5.3', 'sqlalchemy=1.4.39', 'statsmodels=0.13.2', 'textacy=0.11.0', 'wikipedia=1.4.0', 'xlsxwriter=3.0.3']


�[91mbash: line 1:     9 Killed                  ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "binder/environment.yml"
time: 1628.928
�[0mRemoving intermediate container d49ceb6301e1
The command '/bin/sh -c TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "binder/environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '' returned a non-zero code: 137

@rgaiacs
Copy link
Collaborator

rgaiacs commented Aug 21, 2023

@stammler do you continue to encounter this error? I can not reproduce it.

Regarding https://github.com/gesiscss/css_methods_python, I created #2728 as the issue is in the user repository but we could improve the log.

@stammler
Copy link
Author

I forced it to use Python 3.10, which solved the problem. I haven't tried it without specifying a version since then. I will try it as soon as possible and report back.

@rgaiacs
Copy link
Collaborator

rgaiacs commented Aug 28, 2023

I'm closing this in favour of #2728.

@rgaiacs rgaiacs closed this as completed Aug 28, 2023
yakutovicha pushed a commit to empa-scientific-it/python-tutorial that referenced this issue Oct 4, 2023
It seems that a recent update to Mamba is causing a problem when building the
Docker image from the repo via repo2docker. See jupyterhub/mybinder.org-deploy#2714.
This PR fixes the version of `repo2docker` to the last one that didn't have this problem,
and the image is built correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants