Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

KeyError: 'apt_packages' with latest commit #40

@eschnett

Description

@eschnett

The latest commit seems to have introduce an error into handling configuration files. I have a project that does not have a .calibanconfig.json file, and caliban shell now reports an error:

(base) MAC0008052:DDF.jl erikschnetter$ caliban shell --nogpu
Traceback (most recent call last):
  File "/Users/erikschnetter/opt/anaconda3/bin/caliban", line 11, in <module>
    load_entry_point('caliban==0.2.6+9.gf59ace0', 'console_scripts', 'caliban')()
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/main.py", line 164, in main
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/main.py", line 74, in run_app
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/platform/shell.py", line 113, in run_interactive
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/platform/run.py", line 295, in run
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/docker/build.py", line 628, in build_image
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/docker/build.py", line 583, in _dockerfile_template
  File "/Users/erikschnetter/opt/anaconda3/lib/python3.7/site-packages/caliban-0.2.6+9.gf59ace0-py3.7.egg/caliban/config/__init__.py", line 164, in apt_packages
KeyError: 'apt_packages'

I believe the problem is that caliban_config creates an empty dictionary, and apt_packages later tries to access the key "apt_packages" in there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions