In python 3 dict.keys() returns a view and not a copy of the keys, so you cannot pop items from the dictionary inside a loop over keys. The solution is to make a copy of the keys when iterating (python 2 and 3 safe).
Error:
Traceback (most recent call last):
File "/home/andyofmelbourne/Documents/2022/Xavier_p003004/hummingbird/src/interface/data_source.py", line 183, in _get_request_reply
for k in self._plotdata.keys():
RuntimeError: dictionary changed size during iteration
Solution:
#for k in self._plotdata.keys():
for k in list[self._plotdata.keys()]:
if k not in self.titles:
self._plotdata.pop(k)
In python 3 dict.keys() returns a view and not a copy of the keys, so you cannot pop items from the dictionary inside a loop over keys. The solution is to make a copy of the keys when iterating (python 2 and 3 safe).
Error:
Solution: