Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument of type "None" cannot be assigned to parameter "screen" of type "XlibScreen" in function "__init__" "None" is incompatible with "XlibScreen" #2279

Open
Eronex opened this issue Jul 18, 2024 · 1 comment

Comments

@Eronex
Copy link

Eronex commented Jul 18, 2024

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()

@einarf
Copy link
Member

einarf commented Jul 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants