Skip to content

Commit

Permalink
Don't blow up if fields are missing
Browse files Browse the repository at this point in the history
Sometimes we don't have data (i.e., no bids/asks, no market price) for
contracts, and rather than blowing up we should just continue gracefully
  • Loading branch information
brndnmtthws committed Dec 3, 2024
1 parent ca57246 commit aad9719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thetagang/portfolio_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ def fallback_minimum_price() -> float:
console.print(
"[yellow]Error occurred when trying to roll position. Continuing anyway...",
)
except RuntimeError:
except (RuntimeError, RequiredFieldValidationError):
console.print_exception()
console.print(
"[yellow]Error occurred when trying to roll position. Continuing anyway...",
Expand Down

0 comments on commit aad9719

Please sign in to comment.