Skip to content

CLI has issues #799

Description

@kvashchuka

When running example https://github.com/equinor/acidwatch/blob/main/examples/acidwatch_api.ipynb I get the error below. I suspect it has to do with change to co2-rich and aqueous phase in models' response.

session.run_model("tocomo", concs, params, temperature=T, pressure=T)
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    session.run_model("tocomo", concs, params, temperature=T, pressure=T)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/AKVAS/equinor_repos/venv-test/lib/python3.13/site-packages/acidwatch/client.py", line 140, in run_model
    res = _SimulationResult.model_validate_json(response.content)
  File "/Users/AKVAS/equinor_repos/venv-test/lib/python3.13/site-packages/pydantic/main.py", line 782, in model_validate_json
    return cls.__pydantic_validator__.validate_json(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        json_data, strict=strict, extra=extra, context=context, by_alias=by_alias, by_name=by_name
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
pydantic_core._pydantic_core.ValidationError: 1 validation error for RootModel[Annotated[Union[SimulationResult, SimulationResultPending], FieldInfo(annotation=NoneType, required=True, discriminator='status')]]
done.results.0.concentrations                                                                                                                                                                                                         
  Field required [type=missing, input_value={'phases': [{'kind': 'co2...': 0, 'HNO₂': 0}]}]}, input_type=dict]                                                                                                                        
    For further information visit https://errors.pydantic.dev/2.13/v/missing  

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