Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

ValueError trying to run installation example #22

@juno53211

Description

@juno53211

After running pip install balloon_learning_environment (in a clean virtual environment made using venv), I tried to run the example:

% python -m balloon_learning_environment.eval.eval \
  --agent=station_seeker \
  --renderer=matplotlib \
  --suite=micro_eval \
  --output_dir=/tmp/ble/eval

and got the following error:

raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'balloon_learning_environment.utils.units.Power'> for field nighttime_power_load is not allowed: use default_factory

System Configuration:
MacBook Air (M1, 2020)
Apple M1 Chip
16 GB Memory
OSX version 12.7.4

Can someone please advise me on how to fix this? Thank you

Here is the full dump:

% python -m balloon_learning_environment.eval.eval \
  --agent=station_seeker \
  --renderer=matplotlib \
  --suite=micro_eval \
  --output_dir=/tmp/ble/eval
/~/lib/python3.12/site-packages/gym/envs/registration.py:440: UserWarning: WARN: The `registry.env_specs` property along with `EnvSpecTree` is deprecated. Please use `registry` directly as a dictionary instead.
  logger.warn(
/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon/acs.py:24: DeprecationWarning: Please import `interp1d` from the `scipy.interpolate` namespace; the `scipy.interpolate.interpolate` namespace is deprecated and will be removed in SciPy 2.0.0.
  _PRESSURE_RATIO_TO_POWER: interpolate.interpolate.interp1d = (
/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon/acs.py:32: DeprecationWarning: `interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.14.0.

For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.

In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.

For more details see
`https://scipy.github.io/devdocs/notebooks/interp_transition_guide.html`

  interpolate.interp2d(
/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon/acs.py:31: DeprecationWarning: Please import `interp2d` from the `scipy.interpolate` namespace; the `scipy.interpolate.interpolate` namespace is deprecated and will be removed in SciPy 2.0.0.
  _PRESSURE_RATIO_POWER_TO_EFFICIENCY: interpolate.interpolate.interp2d = (
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/eval/eval.py", line 26, in <module>
    from balloon_learning_environment.env import balloon_env  # pylint: disable=unused-import
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon_env.py", line 25, in <module>
    from balloon_learning_environment.env import balloon_arena
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon_arena.py", line 27, in <module>
    from balloon_learning_environment.env import features
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/env/features.py", line 37, in <module>
    from balloon_learning_environment.env import simulator_data
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/env/simulator_data.py", line 21, in <module>
    from balloon_learning_environment.env.balloon import balloon
  File "/~/lib/python3.12/site-packages/balloon_learning_environment/env/balloon/balloon.py", line 72, in <module>
    @dataclasses.dataclass
     ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/dataclasses.py", line 1268, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/dataclasses.py", line 1258, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/dataclasses.py", line 994, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/dataclasses.py", line 852, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'balloon_learning_environment.utils.units.Power'> for field nighttime_power_load is not allowed: use default_factory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions