Skip to content

KeyError Message #6

@FantasyAres

Description

@FantasyAres

Hi, I am having an issue running the program. When I try to run, I get the following below.


python blackjack_original.py BasicStrategy.csv
Traceback (most recent call last):
File "blackjack_original.py", line 468, in
game.play_round()
File "blackjack_original.py", line 436, in play_round
self.player.play(self.shoe)
File "blackjack_original.py", line 261, in play
self.play_hand(hand, shoe)
File "blackjack_original.py", line 275, in play_hand
flag = HARD_STRATEGY[hand.value][self.dealer_hand.cards[0].name]
KeyError: 'Ace'


The KeyError is related to the cards dict? How can I resolve? Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions