arcade
arcade copied to clipboard
Argument of type "None" cannot be assigned to parameter "screen" of type "XlibScreen" in function "__init__" "None" is incompatible with "XlibScreen"
Bug Report
Only create simple Window and get error message:
Pyright: Argument of type "None" cannot be assigned to parameter "screen" of type "XlibScreen" in function "__init__" "None" is incompatible with "XlibScreen" [reportArgumentType]
System Info
$ python -m arcade
Arcade 2.6.17
-------------
vendor: AMD
renderer: AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.57, 6.8.9-100.fc38.x86_64)
version: (4, 6)
python: 3.11.9 (main, Apr 17 2024, 00:00:00) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)]
platform: linux
Steps to reproduce/example code:
import os
# os.environ["ARCADE_HEADLESS"] = "True"
import arcade
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
SCREEN_TITLE = "WorldLife"
class Human:
pass
class WorldLifeServer(arcade.Window):
def __init__(self):
super().__init__(SCREEN_WIDTH,SCREEN_HEIGHT,SCREEN_TITLE)
def setup(self):
pass
def on_draw(self):
pass
def on_update(self,delta_time):
pass
def main():
game=WorldLifeServer()
game.setup()
arcade.run()
if __name__ == "__main__":
main()
Likely you have ended up with the wrong pyglet version. You can also try the latest arcade 3.0dev30 release. It's about 2 years ahead on development compared to 2.6.
Closing this for now.