-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Description
Hello,
While running the calendar code from Chapter 3 (Handling Events with Signals and Slots), I ran into an error while testing out the app. If I create a new event, select the event, then click on a new calendar day, the program exits with this error:
Traceback (most recent call last):
File "test_app_2.py", line 167, in populate_form
event_data = self.events.get(date)[event_number]
TypeError: 'NoneType' object is not subscriptable
Abort trap: 6I downloaded the code from github to make sure the error wasn't just in my program, and the behavior was the same. I fixed this issue in my own code by adding self.event_list.setCurrentRow(-1) to the first line of the populate_list function, which clears the event list selection when a new day is selected on the calendar.
Metadata
Metadata
Assignees
Labels
No labels