Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Open recipe in binary mode #353

Closed
dhirschfeld opened this issue Jun 23, 2023 · 0 comments · Fixed by #354
Closed

Open recipe in binary mode #353

dhirschfeld opened this issue Jun 23, 2023 · 0 comments · Fixed by #354

Comments

@dhirschfeld
Copy link
Contributor

Just kicking the tyres on this one and running into:

Traceback (most recent call last):
  File "/opt/mambaforge/envs/bin/bin/boa", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/mambaforge/envs/bin/lib/python3.11/site-packages/boa/cli/boa.py", line 244, in main
    run_build(args)
  File "/opt/mambaforge/envs/bin/lib/python3.11/site-packages/boa/core/run_build.py", line 502, in run_build
    all_recipes = find_all_recipes(args.target, config, is_pyproject_recipe)  # [noqa]
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/mambaforge/envs/bin/lib/python3.11/site-packages/boa/core/run_build.py", line 53, in find_all_recipes
    yml = render(fn, config=config, is_pyproject_recipe=is_pyproject_recipe)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/mambaforge/envs/bin/lib/python3.11/site-packages/boa/core/render.py", line 177, in render
    ydoc = tomllib.load(fi)
           ^^^^^^^^^^^^^^^^
  File "/opt/mambaforge/envs/bin/lib/python3.11/tomllib/_parser.py", line 63, in load
    raise TypeError(
TypeError: File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`

...which looks like it's complaining about:

with open(recipe_path, "r") as fi:

Originally posted by @dhirschfeld in #345 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant