471,334 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,334 software developers and data experts.

deepcopy debugging

I'm using deepcopy in some code which eventually ends up by crash witht he
following rather long winded error. I'm not directly using _hashlib.HASH, but I
suppose something else along the way could be. Is there some nice way to make
copy/deepcopy give more information when this error happens? I know what the top
level object is, but presumably it's something further down that's causing the
problem.

..........

File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 234, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 227, in _deepcopy_list
y.append(deepcopy(a, memo))
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 234, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 234, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 291, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python\lib\copy.py", line 254, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python\lib\copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python\lib\copy.py", line 322, in _reconstruct
y = callable(*args)
File "C:\Python\lib\copy_reg.py", line 92, in __newobj__
return cls.__new__(cls, *args)
TypeError: object.__new__(_hashlib.HASH) is not safe, use _hashlib.HASH.__new__()
--
Robin Becker

Oct 19 '07 #1
0 1283

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Eugeni Doljenko | last post: by
7 posts views Thread by ‘5ÛHH575-UAZWKVVP-7H2H48V3 | last post: by
6 posts views Thread by Alexander Zatvornitskiy | last post: by
reply views Thread by phil | last post: by
6 posts views Thread by phil | last post: by
reply views Thread by Joshua Ginsberg | last post: by
7 posts views Thread by Alexandre Guimond | last post: by
1 post views Thread by Wouter DW | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.