DiamondLightSource / DiamondLightSource/blueapi

Have an error if a device composite is not found in the blueapi context

Open
#1,526 1 comment 0 reactions 0 assignees View on GitHub
needs clarification
Dominant language
Python
Stars
13
Forks
13
Avg merge
2d 11h
Merged PRs (30d)
25

Description

When injecting a device composite instead of a single device, if the composite has not been added to the module and not discoverable by blueapi, the only error that will show up on the blueapi logs is a `PydanticInvalidForJsonSchema` pointing to the first device in the composite, eg

```
raise self._value
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema ()
```

This is a bit confusing because it doesn't really give any information about where the error might be - in particular when the device otherwise connects and is used in other plans.

Related to #1525 . Run into this while testing on I19 and couldn't figure out what was missing until I took a look at the planFunctions module used in hyperion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.