Skip to content

[BUG] - Logger throws error if sys.modules.items changes size #61

@Apfelkuchen

Description

@Apfelkuchen

Describe the bug
When using L1Q 2.23.0 for wmiqc, we get a RuntimeError: dictionary changed size during iteration. line 44, in _showwarning in laboneq/controller/laboneq_logging.py.

We can hotfix this at the moment by casting the returned object to tuple or list, i.e. we change (line 44 in laboneq_logging.py)

for modname, module in sys.modules.items():

to

for modname, module in tuple(sys.modules.items()):

Versions used:

  • laboneq: 2.23.0
  • zhinst-core: 23.10.52579
  • wmiqc: 0.57.4

Context

  • Do you know a workaround for the issue? If yes, please provide a short description -> see above
  • Does the issue block your experiments? -> Yes, but we can fix it ourselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjiraSync the issue to ZI LabOneQ internal issue tracker.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions