Traceback: <traceback object at 0x000001B33843FC00>
Type: <class 'AttributeError'>
Value: '_tkinter.tkapp' object has no attribute 'game'
Full Traceback:
Traceback (most recent call last):
File "C:\Users\athar\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Users\athar\Desktop\Python\pit-mopper\Scripts\single_player.py", line 141, in <lambda>
self.load_last_button = Button(self, text='Load Last Game', command=lambda: self.load_game(file=constants.LAST_GAME_FILE))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\athar\Desktop\Python\pit-mopper\Scripts\single_player.py", line 417, in load_game
self.create_game(None, game=data)
File "C:\Users\athar\Desktop\Python\pit-mopper\Scripts\single_player.py", line 312, in create_game
win = self.game.result['win']
^^^^^^^^^
File "C:\Users\athar\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 2410, in __getattr__
return getattr(self.tk, attr)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_tkinter.tkapp' object has no attribute 'game'
Debug Log Output
2024-02-17 20:18:15,398 [INFO]: Loading...
2024-02-17 20:18:16,131 [INFO]: Loading new app instance...
2024-02-17 20:18:16,261 [INFO]: Finished loading
2024-02-17 20:18:41,865 [INFO]: User switched theme to dark mode
2024-02-17 20:18:49,024 [INFO]: Loading single player...
2024-02-17 20:18:49,032 [INFO]: Loading new app instance...
2024-02-17 20:18:49,043 [INFO]: User switched theme to dark mode
2024-02-17 20:18:49,283 [INFO]: GUI successfully created
2024-02-17 20:18:56,900 [INFO]: Setting game size to: (10, 10)
2024-02-17 20:18:59,272 [INFO]: Setting custom game size: (5, 4)
2024-02-17 20:19:00,915 [INFO]: Setting game size to: (10, 10)
2024-02-17 20:19:10,058 [INFO]: Creating grid of buttons...
2024-02-17 20:19:10,318 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:19:11,630 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:19:10.058005
grid:
zeros_checked: []
num_mines: 10
chording: False
mines_found: 0
additional_time: 0
2024-02-17 20:19:11,630 [INFO]: Loading highscore...
2024-02-17 20:19:11,630 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:19:11,636 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:19:11,636 [INFO]: 10x10 Pit Mopper Game starting...
2024-02-17 20:19:11,638 [INFO]: Entering while loop...
2024-02-17 20:19:30,758 [INFO]: Game has been won because all squares are clicked and all mines flagged
2024-02-17 20:19:32,664 [INFO]: Destroying window
2024-02-17 20:19:32,758 [INFO]: User switched theme to dark mode
2024-02-17 20:19:42,010 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:19:43,380 [INFO]: Creating grid of buttons...
2024-02-17 20:19:44,325 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:19:47,141 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:19:43.380639
grid:
zeros_checked: []
num_mines: 50
chording: True
mines_found: 0
additional_time: 0
2024-02-17 20:19:47,141 [INFO]: Loading highscore...
2024-02-17 20:19:47,141 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:19:47,141 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:19:47,142 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:19:47,144 [INFO]: Entering while loop...
2024-02-17 20:21:35,727 [INFO]: The game is over, and it is lost.
2024-02-17 20:21:40,931 [INFO]: Destroying window
2024-02-17 20:21:41,390 [INFO]: User switched theme to dark mode
2024-02-17 20:21:43,671 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:21:45,036 [INFO]: Creating grid of buttons...
2024-02-17 20:21:46,231 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:23:14,151 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:21:45.036929
grid:
zeros_checked: []
num_mines: 50
chording: False
mines_found: 0
additional_time: 0
2024-02-17 20:23:14,151 [INFO]: Loading highscore...
2024-02-17 20:23:14,152 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:23:14,152 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:23:14,152 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:23:14,154 [INFO]: Entering while loop...
2024-02-17 20:23:25,726 [INFO]: The game is over, and it is lost.
2024-02-17 20:23:26,984 [INFO]: Destroying window
2024-02-17 20:23:27,391 [INFO]: User switched theme to dark mode
2024-02-17 20:23:58,321 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:24:02,949 [INFO]: Creating grid of buttons...
2024-02-17 20:24:03,751 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:24:07,914 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:24:02.949839
grid:
zeros_checked: []
num_mines: 50
chording: True
mines_found: 0
additional_time: 0
2024-02-17 20:24:07,914 [INFO]: Loading highscore...
2024-02-17 20:24:07,914 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:24:07,915 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:24:07,915 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:24:07,916 [INFO]: Entering while loop...
2024-02-17 20:27:58,069 [INFO]: Saving game with the following attributes:
PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 24, 7, 916755), num_mines=50, additional_time=0.0, seconds=235.069716, chording=True)
2024-02-17 20:27:58,070 [INFO]: Data to save: PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 24, 7, 916755), num_mines=50, additional_time=0.0, seconds=235.069716, chording=True)
2024-02-17 20:28:14,497 [INFO]: Saving data...
2024-02-17 20:28:14,499 [INFO]: Data successfully saved
2024-02-17 20:28:20,449 [INFO]: Game has been won because all squares are clicked and all mines flagged
2024-02-17 20:28:22,781 [INFO]: Destroying window
2024-02-17 20:28:23,516 [INFO]: User switched theme to dark mode
2024-02-17 20:29:26,394 [INFO]: Setting game size to: (30, 30)
2024-02-17 20:29:27,594 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:29:28,794 [INFO]: Setting game size to: (30, 30)
2024-02-17 20:29:33,354 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:29:34,531 [INFO]: Creating grid of buttons...
2024-02-17 20:29:35,865 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:29:38,613 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:29:34.531045
grid:
zeros_checked: []
num_mines: 50
chording: False
mines_found: 0
additional_time: 0
2024-02-17 20:29:38,613 [INFO]: Loading highscore...
2024-02-17 20:29:38,614 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:29:38,614 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:29:38,614 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:29:38,616 [INFO]: Entering while loop...
2024-02-17 20:29:54,595 [INFO]: Saving game with the following attributes:
PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 29, 38, 616735), num_mines=50, additional_time=0.0, seconds=19.482999, chording=False)
2024-02-17 20:29:54,595 [INFO]: Data to save: PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 29, 38, 616735), num_mines=50, additional_time=0.0, seconds=19.482999, chording=False)
2024-02-17 20:29:54,597 [INFO]: Saving data...
2024-02-17 20:29:54,599 [INFO]: Data successfully saved
2024-02-17 20:29:55,078 [INFO]: User switched theme to dark mode
2024-02-17 20:29:58,937 [INFO]: Opening game...
2024-02-17 20:29:58,937 [INFO]: Reading C:\Users\athar\AppData\Local\Pit Mopper\last.ptmpr...
2024-02-17 20:29:58,939 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\last.ptmpr successfully read, setting up game...
2024-02-17 20:29:59,057 [INFO]: Loading highscore...
2024-02-17 20:29:59,058 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:29:59,058 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:29:59,059 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:29:59,061 [INFO]: Entering while loop...
2024-02-17 20:30:07,974 [INFO]: Saving game with the following attributes:
PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 29, 38, 616735), num_mines=50, additional_time=19.482999, seconds=26.026946, chording=False)
2024-02-17 20:30:07,975 [INFO]: Data to save: PickleGame(grid=, start=datetime.datetime(2024, 2, 17, 20, 29, 38, 616735), num_mines=50, additional_time=19.482999, seconds=26.026946, chording=False)
2024-02-17 20:30:07,975 [INFO]: Saving data...
2024-02-17 20:30:07,978 [INFO]: Data successfully saved
2024-02-17 20:30:08,518 [INFO]: User switched theme to dark mode
2024-02-17 20:30:12,304 [INFO]: Setting game size to: (20, 20)
2024-02-17 20:30:15,719 [INFO]: Creating grid of buttons...
2024-02-17 20:30:17,116 [INFO]: Grid Created, waiting for button press...
2024-02-17 20:30:19,652 [INFO]: Creating game with following attributes:
start: 2024-02-17 20:30:15.719142
grid:
zeros_checked: []
num_mines: 50
chording: True
mines_found: 0
additional_time: 0
2024-02-17 20:30:19,653 [INFO]: Loading highscore...
2024-02-17 20:30:19,653 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt does exist, reading data from it
2024-02-17 20:30:19,653 [INFO]: C:\Users\athar\AppData\Local\Pit Mopper\highscore.txt successfully read
2024-02-17 20:30:19,654 [INFO]: 20x20 Pit Mopper Game starting...
2024-02-17 20:30:19,655 [INFO]: Entering while loop...
2024-02-17 20:30:33,604 [INFO]: The game is over, and it is lost.
2024-02-17 20:30:35,193 [INFO]: Destroying window
2024-02-17 20:30:35,729 [INFO]: User switched theme to dark mode
This is an auto generated bug report
Description
i have no idea what happened
More information
Traceback: <traceback object at 0x000001B33843FC00> Type: <class 'AttributeError'> Value: '_tkinter.tkapp' object has no attribute 'game'
Full Traceback:
Debug Log Output
2024-02-17 20:18:15,398 [INFO]: Loading... 2024-02-17 20:18:16,131 [INFO]: Loading new app instance... 2024-02-17 20:18:16,261 [INFO]: Finished loading 2024-02-17 20:18:41,865 [INFO]: User switched theme to dark mode 2024-02-17 20:18:49,024 [INFO]: Loading single player... 2024-02-17 20:18:49,032 [INFO]: Loading new app instance... 2024-02-17 20:18:49,043 [INFO]: User switched theme to dark mode 2024-02-17 20:18:49,283 [INFO]: GUI successfully created 2024-02-17 20:18:56,900 [INFO]: Setting game size to: (10, 10) 2024-02-17 20:18:59,272 [INFO]: Setting custom game size: (5, 4) 2024-02-17 20:19:00,915 [INFO]: Setting game size to: (10, 10) 2024-02-17 20:19:10,058 [INFO]: Creating grid of buttons... 2024-02-17 20:19:10,318 [INFO]: Grid Created, waiting for button press... 2024-02-17 20:19:11,630 [INFO]: Creating game with following attributes: start: 2024-02-17 20:19:10.058005 grid: