This gives me this error:
Exception thread in thread -163: traceback ( Most recent calls last): File "C: \ Python26 \ lib \ threading.py", line 532, __bootstrap_inner self. In the file "C: \ Python26 \ lib \ threading.py", line 736, run the self (* self.args, ** self.kwargs) file "C: \ Users \ Public \ SoundLog \ Code \ Código Python \ SoundLog \ SoundLog.py ", line 337, the self.data1 = copy.deepcopy (Auxiliar DataCollection.getInfo (1)) file in getInfo" C: \ Python26 \ lib \ copy.py ", line 162, deepcopy y = Copier (x, memo) file "C: \ Python26 \ lib \ copy.py", line 254, in key _deepcopy_dict, value in x.iteritems (): runtime error: while executing your python program
Words change while walking.
How can I survive to do this?
Thank you in advance;)
General advice, as per other answers To avoid using, use iteritems
(rather than use items
). Of course, in your case, an option is not , because iteritems
calls are being made deep in the intestine of the system call on your behalf.
So, what I can suggest, Auxiliar.DataCollection.getInfo (1)
gives a dictionary (which is changing in the copy) that you Call your deepcopy
:
self.data1 = copy.deepcopy (dict (Auxiliar.DataCollection.getInfo (1)))
It takes a "snapshot" question, and if the snapshot will not change, you will be fine.
If a code returns Auxiliar.DataCollection.getInfo (1)
not , but there are some more complex objects in which the items and / or attributes As Dictates are included, it will be a bit more complex, because those dicks will require you to make snapshots. However, it is impossible to be more specific in this case, since you do not give us any clues exactly like that code which is important Auxiliar.DataCollection.getInfo (1)
call! -)
Comments
Post a Comment