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

mamba failing with conda-build 3.26.0 #2715

Closed
2 tasks done
BenjaminLowry opened this issue Jul 27, 2023 · 6 comments · Fixed by #2732
Closed
2 tasks done

mamba failing with conda-build 3.26.0 #2715

BenjaminLowry opened this issue Jul 27, 2023 · 6 comments · Fixed by #2732
Labels
type::bug Something isn't working

Comments

@BenjaminLowry
Copy link

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Mambaforge

Search tried in issue tracker

conda build AttributeError

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

As of conda-build 3.26.0 mamba build ~/conda_recipe fails with the following error message

'Namespace' object has no attribute 'func'

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

    Traceback (most recent call last):
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/conda/exception_handler.py", line 16, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 926, in exception_converter
        raise e
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 919, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 877, in _wrapped_main
        result = do_call(parsed_args, p)
                 ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 709, in do_call
        relative_mod, func_name = args.func.rsplit(".", 1)
                                  ^^^^^^^^^
    AttributeError: 'Namespace' object has no attribute 'func'

`$ /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/bin/mamba build conda_recipe/meta.yaml`

This does not fail with conda-build 3.25.0 and conda build ~/conda_recipe and conda-build ~/conda_recipe both succeed so there seems to be some broken interaction between mamba and conda/conda-build.

mamba info / micromamba info

mamba version : 1.4.9
     active environment : /home/coder/mamba/envs-dirs/mamba-working
    active env location : /home/coder/mamba/envs-dirs/mamba-working
            shell level : 1
       user config file : /home/coder/.condarc
 populated config files : 
          conda version : 23.5.2
    conda-build version : 3.26.0
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro  (writable)
      conda av data dir : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/etc/conda
  conda av metadata url : None
           channel URLs : 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 : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/pkgs
                          /home/coder/.conda/pkgs
       envs directories : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/envs
                          /home/coder/.conda/envs
               platform : linux-64
             user-agent : conda/23.5.2 requests/2.31.0 CPython/3.11.4 Linux/5.15.0-1039-aws ubuntu/20.04.6 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Logs

/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/bin/mamba build conda_recipe/meta.yaml -v
'Namespace' object has no attribute 'func'

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

    Traceback (most recent call last):
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/conda/exception_handler.py", line 16, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 926, in exception_converter
        raise e
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 919, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 877, in _wrapped_main
        result = do_call(parsed_args, p)
                 ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/lib/python3.11/site-packages/mamba/mamba.py", line 709, in do_call
        relative_mod, func_name = args.func.rsplit(".", 1)
                                  ^^^^^^^^^
    AttributeError: 'Namespace' object has no attribute 'func'

`$ /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/bin/mamba build conda_recipe/meta.yaml -v`

  environment variables:
                 CIO_TEST=<not set>
    CONDA_ALLOW_SOFTLINKS=false
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/home/coder/mamba/envs-dirs/mamba-working/bin/conda
             CONDA_PREFIX=/home/coder/mamba/envs-dirs/mamba-working
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/home/coder/mamba/envs-dirs/mamba-working/bin/python
               CONDA_ROOT=/home/coder/mamba/envs-dirs/mamba-working/envs/build-repro
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
                GONOPROXY=<set>
                   GOPATH=/home/coder/go
                  GOPROXY=<set>
               LD_PRELOAD=<not set>
                     PATH=/home/coder/mamba/envs-dirs/mamba-working/bin:/opt/mamba-
                          installer/condabin:/opt/mamba-installer/bin:/usr/local/go/bin:/home/co
                          der/go/bin:/opt/java11/bin:/opt/nodejs/current/bin:/usr/local/cargo/bi
                          n:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/tm
                          p/coder/code-server/bin:/var/tmp/coder/coder-cli
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
               http_proxy=<set>
              https_proxy=<set>
                 no_proxy=<set>

     active environment : /home/coder/mamba/envs-dirs/mamba-working
    active env location : /home/coder/mamba/envs-dirs/mamba-working
            shell level : 1
       user config file : /home/coder/.condarc
 populated config files : 
          conda version : 23.5.2
    conda-build version : 3.26.0
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro  (writable)
      conda av data dir : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/etc/conda
  conda av metadata url : None
           channel URLs : 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 : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/pkgs
                          /home/coder/.conda/pkgs
       envs directories : /home/coder/mamba/envs-dirs/mamba-working/envs/build-repro/envs
                          /home/coder/.conda/envs
               platform : linux-64
             user-agent : conda/23.5.2 requests/2.31.0 CPython/3.11.4 Linux/5.15.0-1039-aws ubuntu/20.04.6 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


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

environment.yml

No response

~/.condarc

No response

@BenjaminLowry
Copy link
Author

This also seems to be failing for other conda commands with conda version 23.7.1 released last night:

 Starting process 'command 'mamba''. Working directory: /tmp/junit7485067018271619646/my_project Command: mamba env list --json

    Successfully started process 'command 'mamba''

    'Namespace' object has no attribute 'func'


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


        Traceback (most recent call last):

          File "/home/circleci/project/build/conda-env/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__

            return func(*args, **kwargs)

                   ^^^^^^^^^^^^^^^^^^^^^

          File "/home/circleci/project/build/conda-env/lib/python3.11/site-packages/mamba/mamba.py", line 926, in exception_converter

            raise e

          File "/home/circleci/project/build/conda-env/lib/python3.11/site-packages/mamba/mamba.py", line 919, in exception_converter

            exit_code = _wrapped_main(*args, **kwargs)

                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

          File "/home/circleci/project/build/conda-env/lib/python3.11/site-packages/mamba/mamba.py", line 877, in _wrapped_main

            result = do_call(parsed_args, p)

                     ^^^^^^^^^^^^^^^^^^^^^^^

          File "/home/circleci/project/build/conda-env/lib/python3.11/site-packages/mamba/mamba.py", line 709, in do_call

            relative_mod, func_name = args.func.rsplit(".", 1)

                                      ^^^^^^^^^

        AttributeError: 'Namespace' object has no attribute 'func'

@jonashaag
Copy link
Collaborator

Hmm we have a conda-canary build that tested with

conda                     23.5.2+85_g08c7ed661  py310_0             conda-canary/label/dev

4 days ago but maybe the change was in the meantime.

@jonashaag jonashaag added the type::bug Something isn't working label Jul 27, 2023
@BenjaminLowry
Copy link
Author

Not seeing issues with conda 23.5.2, only with conda-build 3.26.0, conda 23.7.x or a combination of both

@breengles
Copy link

Seems like it is also related to the issue
conda-forge/miniforge#475

@chrisburr
Copy link
Contributor

This is actually an issue with conda>=23.7.0 which I suspect is caused by the new CLI plugin system stuff. To reproduce with micromamba-created environments:

micromamba create --yes --prefix /tmp/example-prefix -c conda-forge 'mamba=1.4.9' 'conda=23.7.2'
micromamba activate /tmp/example-prefix

You can now see mamba env fails:

mamba env --help

@jaimergp
Copy link
Contributor

jaimergp commented Aug 3, 2023

I think #2732 should fix this

costrouc added a commit to conda-incubator/conda-store that referenced this issue Aug 4, 2023
costrouc added a commit to conda-incubator/conda-store that referenced this issue Aug 4, 2023
…#522)

* Initial work on making API endpoint for accessing role_mappings/metadat

* Ruff checks

* Major refactor to move towards explicit sessions in sqlalchemy

* Getting celery tasks to use same database session

* Disable thread check escape for proper testing

* Black formatting

* Remove echo statement

* Fixing tests

* Ensure that celery db is initialized and fix missing call

* Do not check same thread in tests

* Adding better debugging

* Pinning conda version until 23.7.X issues are resolved

See mamba-org/mamba#2715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants