Skip to content

Commit 0f330b6

Browse files
Fix IndexError: tuple index out of range (#511)
This PR fixes the IndexError: tuple index out of range when an error does not have arguments.
1 parent 126cf6d commit 0f330b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudpickle/cloudpickle_fast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def dump(self, obj):
631631
try:
632632
return Pickler.dump(self, obj)
633633
except RuntimeError as e:
634-
if "recursion" in e.args[0]:
634+
if len(e.args) > 0 and "recursion" in e.args[0]:
635635
msg = (
636636
"Could not pickle object as excessively deep recursion "
637637
"required."

0 commit comments

Comments
 (0)