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

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

Open
2 tasks done
Apfelkuchen opened this issue Feb 7, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working jira Sync the issue to ZI LabOneQ internal issue tracker.

Comments

@Apfelkuchen
Copy link

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.
@polwel
Copy link
Contributor

polwel commented Feb 8, 2024

Hi @Apfelkuchen, your workaround is sensible. I am tempted to adopt it. Thanks!

@mforoozandeh mforoozandeh added the jira Sync the issue to ZI LabOneQ internal issue tracker. label Feb 8, 2024
@QuantumClemens QuantumClemens added the bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira Sync the issue to ZI LabOneQ internal issue tracker.
Projects
None yet
Development

No branches or pull requests

4 participants