Skip to content

Running FastCS demo against the sim fails due to GraphQL transport error #324

@JamesOHeaDLS

Description

@JamesOHeaDLS

I've encountered problems running up the FastCS demo - the sim launches fine, but 'Temp Controller FastCS' crashes when it tries to make the Strawberry Schema, complaining about
Unexpected type '<class 'numpy.ndarray'>'

Fuller error message:

│ /cache/venv-for/scratch/fmq68384/code/FastCS/lib/python3.11/site-packages/graphql/type/definition.py:837 in fields                                              │
│                                                                                                                                                                 │
│    834 │   │   │   fields = resolve_thunk(self._fields)                                         ╭────────────── locals ──────────────╮                          │
│    835 │   │   except Exception as error:                                                       │ self = <GraphQLObjectType 'Query'> │                          │
│    836 │   │   │   cls = GraphQLError if isinstance(error, GraphQLError) else TypeError         ╰────────────────────────────────────╯                          │
│ ❱  837 │   │   │   raise cls(f"{self.name} fields cannot be resolved. {error}") from error                                                                      │
│    838 │   │   if not isinstance(fields, Mapping) or not all(                                                                                                   │
│    839 │   │   │   isinstance(key, str) for key in fields                                                                                                       │
│    840 │   │   ):                                                                                                                                               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Query fields cannot be resolved. Unexpected type '<class 'numpy.ndarray'>'

Gary gave me a workaround which is to comment out the GraphQL transport in controller.yaml. ie.

# yaml-language-server: $schema=schema.json
controller:
  ip_settings:
    ip: "localhost"
    port: 25565
  num_ramp_controllers: 4
transport:
  # - graphql:
  #     host: localhost
  #     port: 8083
  #     log_level: info
  - epicsca:
      pv_prefix: GARYDEMO
    gui:
      title: Temperature Controller Demo
      output_path: ./demo.bob

but this needs addressing properly as the graphql transport should work

Acceptance Criteria

Able to run up the FastCS demo against the sim without needing to comment out the graphql transport

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions