Miniconda env with environment.yml fails

Hello. I am trying to create an environment from a environment.yml file.
See below for an error I have been unable to find documentation for.


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

    Traceback (most recent call last):
      File "/Users/milongo/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1132, in __call__
        return func(*args, **kwargs)
      File "/Users/milongo/miniconda3/lib/python3.10/site-packages/conda_env/cli/main.py", line 78, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/Users/milongo/miniconda3/lib/python3.10/site-packages/conda/notices/core.py", line 121, in wrapper
        return func(*args, **kwargs)
      File "/Users/milongo/miniconda3/lib/python3.10/site-packages/conda_env/cli/main_create.py", line 110, in execute
        prefix = determine_target_prefix(context, args)
      File "/Users/milongo/miniconda3/lib/python3.10/site-packages/conda/base/context.py", line 1820, in determine_target_prefix
        if prefix_name is not None and not prefix_name.strip():  # pragma: no cover
    AttributeError: 'dict' object has no attribute 'strip'

`$ /Users/milongo/miniconda3/bin/conda-env create -f environment.yml`

  environment variables:
                 CIO_TEST=<not set>
  CONDA_AUTO_UPDATE_CONDA=false
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/Users/milongo/miniconda3/bin/conda
             CONDA_PREFIX=/Users/milongo/miniconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/Users/milongo/miniconda3/bin/python
               CONDA_ROOT=/Users/milongo/miniconda3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
                 INFOPATH=/opt/homebrew/share/info:/opt/homebrew/share/info:
               LD_PRELOAD=<not set>
                  MANPATH=/opt/homebrew/share/man:/usr/share/man:/usr/local/share/man:/opt/homeb
                          rew/share/man::
                     PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/
                          App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/User
                          s/milongo/miniconda3/bin:/Users/milongo/miniconda3/condabin:/opt/homeb
                          rew/bin:/opt/homebrew/sbin:/Users/milongo/.cargo/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : /Users/milongo/miniconda3
            shell level : 1
       user config file : /Users/milongo/.condarc
 populated config files : 
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=arm64
                          __osx=13.0.1=0
                          __unix=0=0
       base environment : /Users/milongo/miniconda3  (writable)
      conda av data dir : /Users/milongo/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/milongo/miniconda3/pkgs
                          /Users/milongo/.conda/pkgs
       envs directories : /Users/milongo/miniconda3/envs
                          /Users/milongo/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.3.1 requests/2.28.1 CPython/3.10.10 Darwin/22.1.0 OSX/13.0.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False


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

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: n

No report sent. To permanently opt-out, use

    $ conda config --set report_errors false

Any ideas? Thanks for the help!

I just realized the issue but I find it a bit strange since I had used this before.
This is how my environment.yml file looks like:

name: { iac-ansible }
channels:
  - defaults
dependencies:
  - python=3.10
  - pip=22.3
  - flake8=6.0
  - isort=5.9
  - autopep8=1.6
  - ipython=8.10
  - ipykernel=6.19
  - pytest=7.1
  - pytest-mock=3.10
  - pip:
    - molecule
    - ansible
    - boto3
    - awscli

I guess it takes the `{ }` as being a dict.

This post can be deleted! Not sure how to do it myself.