Skip to content

Commit

Permalink
Fix IndexError: tuple index out of range (#511)
Browse files Browse the repository at this point in the history
This PR fixes the IndexError: tuple index out of range when an error does not have arguments.
  • Loading branch information
allisonwang-db authored Aug 4, 2023
1 parent 126cf6d commit 0f330b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudpickle/cloudpickle_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def dump(self, obj):
try:
return Pickler.dump(self, obj)
except RuntimeError as e:
if "recursion" in e.args[0]:
if len(e.args) > 0 and "recursion" in e.args[0]:
msg = (
"Could not pickle object as excessively deep recursion "
"required."
Expand Down

0 comments on commit 0f330b6

Please sign in to comment.