Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PandABlocks-client raises error when using PandA3.1 (b1) firmware #95

Closed
tomtrafford opened this issue Aug 19, 2024 · 1 comment · Fixed by #96
Closed

PandABlocks-client raises error when using PandA3.1 (b1) firmware #95

tomtrafford opened this issue Aug 19, 2024 · 1 comment · Fixed by #96
Assignees

Comments

@tomtrafford
Copy link

I have recently updated the Firmware on BL20J-TS-PANDA-01 (172.23.90.24) to 3.1b1 and it produces the following error:

pandablocks-ioc softioc BL20J-TS-PANDA-01 BL20J-EA-PANDA-01
INFO: PVXS QSRV2 is loaded, permitted, and ENABLED.
Traceback (most recent call last):
  File "/dls/science/users/ysx26594/venvs/pandaIoc/bin/pandablocks-ioc", line 8, in <module>
    sys.exit(cli())
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks_ioc/__main__.py", line 62, in softioc
    create_softioc(
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks_ioc/ioc.py", line 163, in create_softioc
    ).result()
  File "/dls_sw/apps/python/miniforge/4.10.0-0/envs/python3.10/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/dls_sw/apps/python/miniforge/4.10.0-0/envs/python3.10/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks_ioc/ioc.py", line 107, in _create_softioc
    (all_records, all_values_dict, block_info_dict) = await create_records(
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks_ioc/ioc.py", line 1885, in create_records
    (panda_dict, all_values_dict) = await introspect_panda(client)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks_ioc/ioc.py", line 204, in introspect_panda
    returned_infos = await asyncio.gather(
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/asyncio.py", line 140, in send
    raise response
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/connections.py", line 164, in _update_contexts
    exchanges = next(context.generator)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 728, in execute
    field_name_info = yield from _zip_with_return(field_generators)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 143, in _zip_with_return
    exchanges = next(gen)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 513, in _time
    desc, units, min = yield from _execute_commands(
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 126, in _execute_commands
    ret = yield from _zip_with_return([command.execute() for command in commands])
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 143, in _zip_with_return
    exchanges = next(gen)
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/commands.py", line 232, in execute
    return ex.line
  File "/dls/science/users/ysx26594/venvs/pandaIoc/lib/python3.10/site-packages/pandablocks/_exchange.py", line 30, in line
    assert not self.is_multiline and self.received[0].startswith(
pandablocks.commands.CommandException: GetFieldInfo(block='PULSE', extended_metadata=True) raised error:
AssertionError: 'PULSE1.DELAY.MIN?' -> 'ERR No such attribute'

The MIN attribute of Time fields has been removed between 3.0 and 3.1b1 which might be causing this error: PandABlocks/PandABlocks-server#55

@coretl
Copy link
Contributor

coretl commented Aug 20, 2024

Fix is to remove this line:

GetLine(f"{self.block}1.{field_name}.MIN"),

and the corresponding field in TimeFieldInfo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants