Pygame window wont open

Im trying to create a game using pygame and when I run the code I get no errors but the pygame window wont open.

import sys
import pygame

from settings import Settings

class AlienInvasion:
	"""Overall class to manage assets and behavior"""

	def __init__(self):
		"""initialize the game, create game resources"""

		self.screen = pygame.display.set_mode((1200, 800))  #Creates a display window
		pygame.display.set_caption("Alien Invasion")
		#set the background colour

	def run_game(self):
		"""start the main loop for the game"""
		while True:
			#Watch for keyboard and mouse events
			for event in pygame.event.get(): # event is an action made by user
				if event.type == pygame.QUIT:

			#Make the most recently drawn screen visible

if __name__ == '__main___':
	#make a game instance, and run the game.
	ai = AlienInvasion()

When I run the code I get:

pygame 2.1.2 (SDL 2.0.18, Python 3.10.4)
Hello from the pygame community. Contribute - pygame wiki
[Finished in 134ms]

The pygame window doesnt open at all


You have a typo in if __name__ == '__main___':. Instead of two underscores at the end of the __main__ string, you have three. So your code is not executed at all.

Thanks! that worked, but now when the window pops up there is no x button in the top right and the window has no caption above it either, its just a blank square appearing on my screen. Can you spot any other mistakes in the code that I could be overlooking?