Skip to content

[BSABuffer] - BSABuffer object throws an error on initialization sometimes #10

Description

@Ryan-McClanahan

BSABuffer object throughs an error on initialization sometimes. My script initializes and uses the buffer several times before the error is thrown. I have not encountered the error on dev.

My code that the error traces back too:


    bsa_acq = BSABuffer(
        "BSSS diag",
        user="timing team",
    )

Full error:

/usr/local/lcls/package/anaconda/envs/python3.12envs/rhel7/v1.0/lib/python3.12/site-packages/epics/ca.py:1627: UserWarning: ca.get('BSA:SYS0:1:32:AVGCNT') timed out after 5.00 seconds.
  warnings.warn(msg % (name(chid), timeout))
Traceback (most recent call last):
  File "/usr/local/lcls/tools/script/release/TpgScripts/bsss_diag/bsss_diag/bsss_diag.py", line 108, in <module>
    bsss_diag()
  File "/usr/local/lcls/tools/script/release/TpgScripts/bsss_diag/bsss_diag/bsss_diag.py", line 83, in bsss_diag
    bsa_acq = config_buffer()
              ^^^^^^^^^^^^^^^
  File "/usr/local/lcls/tools/script/release/TpgScripts/bsss_diag/bsss_diag/bsss_diag.py", line 17, in config_buffer
    bsa_acq = BSABuffer(
              ^^^^^^^^^^
  File "/usr/local/lcls/package/anaconda/envs/python3.12envs/rhel7/v1.0/lib/python3.12/site-packages/edef/sc_buffer.py", line 42, in __init__
    self.n_avg = avg
    ^^^^^^^^^^
  File "/usr/local/lcls/package/anaconda/envs/python3.12envs/rhel7/v1.0/lib/python3.12/site-packages/edef/sc_buffer.py", line 149, in n_avg
    lopr = self.n_avg_pv.get_ctrlvars()['lower_ctrl_limit']
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
[softegr@lcls-srv01 bsss_diag]$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions