diff --git a/shapefile.py b/shapefile.py index 04fb5ec..6057d7c 100644 --- a/shapefile.py +++ b/shapefile.py @@ -730,6 +730,8 @@ def __getattr__(self, item): corresponding value in the Record does not exist """ try: + if item == "__setstate__": # Prevent infinite loop from copy.deepcopy() + raise AttributeError('_Record does not implement __setstate__') index = self.__field_positions[item] return list.__getitem__(self, index) except KeyError: