Skip to content

Setting SimulationInputOverride value to None, leads to unexpected error #2862

Description

@MortGron

System information (please complete the following information):

  • OS: Windows
  • Python Version: 3.12
  • SDK Version: 8.18

Describe the bug
Setting value to None in SimulationInputOverride when running a simulation leads to an unexpected error. Instead of the API error correctly being raised, an unclear error is raised:

Image

Fundamentally, it seems if a Cognite data class method _load does more data validation than __init__, this problem might occur.

To Reproduce
Runnable code reproducing the error.

client.simulators.runs.create(SimulationRunWrite(..., inputs=[SimulationInputOverride("ref_id", None)]))

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions