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

Malformed HDF5 scema strings cause hang #30

Open
AlexanderWells-diamond opened this issue Sep 16, 2021 · 0 comments
Open

Malformed HDF5 scema strings cause hang #30

AlexanderWells-diamond opened this issue Sep 16, 2021 · 0 comments

Comments

@AlexanderWells-diamond
Copy link
Contributor

Passing a schema string that contains more than the expected number of format specifiers (precisely one %d) causes an exception, but leaves the process running and stuck somewhere.

[eyh46967@pc0103 PandABlocks-client]$ pipenv run pandablocks hdf --arm 172.23.252.201 %s/%s_%d.h5
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/dls_sw/prod/tools/RHEL7-x86_64/Python3/3-7-2dls1/prefix/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/home/eyh46967/dev/PandABlocks-client/pandablocks/hdf.py", line 48, in run
    data = func(data)
  File "/home/eyh46967/dev/PandABlocks-client/pandablocks/hdf.py", line 96, in open_file
    file_path = self.scheme % self.num
TypeError: not enough arguments for format string

The command line help for the schema parameter should probably also be changed to explicitly say "exactly 1 %d", as opposed to its current description:
Uses the filename pattern specified by SCHEME, including %d for scan number starting from 1

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

No branches or pull requests

1 participant