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

Setting resolve_array_lists=True in the example ReadWriteSVD.py results in a "dictionary changed size during iteration" error #1

Open
rowsail opened this issue Aug 30, 2024 · 0 comments

Comments

@rowsail
Copy link

rowsail commented Aug 30, 2024

Using the example ReadWriteSVD.py on the svd file from Espressif for the ESP32S3 (https://github.com/espressif/svd/blob/main/svd/esp32s3.svd) and changing the call to SVDReader.process so that resolve_array_lists=True, I get:

Traceback (most recent call last):
  File "/home/dhowells/python-cmsis-svd-parser/Examples/ReadWriteSVD.py", line 17, in <module>
    device = SVDReader.process(root, resolve_derivations=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhowells/python-cmsis-svd-parser/SVDReader.py", line 956, in process
    device = SVDReader._resolve_arrays_lists(device)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhowells/python-cmsis-svd-parser/SVDReader.py", line 928, in _resolve_arrays_lists
    SVDReader._resolve_arrays_lists(elem, next_lvl_name)
  File "/home/dhowells/python-cmsis-svd-parser/SVDReader.py", line 925, in _resolve_arrays_lists
    for name, elem in next_lvl_collection.items():
RuntimeError: dictionary changed size during iteration

(I have edited the SVDReader.py to accept the "Xtensa LX7" cpu type).

Running with resolve_array_lists=False, executes without error.

This might not be a bug, and could well me be doing something wrong, or the svd file not being quite what is expected/handled.

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