Не открывается окно у игры на python

Roma

Новичок
Пользователь
Авг 9, 2020
11
0
1
Здравствуйте, вот по уроку Хауди Хо сделал игру PyPong но в cmd не отображается окно игры и выдает:
[INFO ] [Logger ] Record log in C:\Users\Admin\.kivy\logs\kivy_20-09-19_16.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - ImportError: DLL load failed: Не найден указанный модуль.
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage

[CRITICAL] [App ] Unable to get a Window, abort.
 

stud_55

Модератор
Команда форума
Модератор
Апр 3, 2020
1 522
672
113
sdl2 - ImportError: DLL load failed: Не найден указанный модуль.
Нужно установить дополнительные модули:
pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
Вот тут можно еще почитать про ошибку: ссылка.
 

Roma

Новичок
Пользователь
Авг 9, 2020
11
0
1
Спасибо, до этого он не скачивался пробывал, сейчас установился но вылезла другая проблема:( :
[INFO ] [Logger ] Record log in C:\Users\Admin\.kivy\logs\kivy_20-09-20_0.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.13547 Compatibility Profile Context 25.20.15016.1002'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) Vega 3 Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File "D:\PyPong\main.py", line 88, in <module>
PongApp().run()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\app.py", line 829, in run
root = self.build()
File "D:\PyPong\main.py", line 83, in build
game.serve_ball()
File "D:\PyPong\main.py", line 43, in serve_ball
self.ball.center = self.center
AttributeError: 'NoneType' object has no attribute 'center'

D:\PyPong>main.py
[INFO ] [Logger ] Record log in C:\Users\Admin\.kivy\logs\kivy_20-09-20_1.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.13547 Compatibility Profile Context 25.20.15016.1002'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) Vega 3 Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File "D:\PyPong\main.py", line 88, in <module>
PongApp().run()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\app.py", line 829, in run
root = self.build()
File "D:\PyPong\main.py", line 83, in build
game.serve_ball()
File "D:\PyPong\main.py", line 43, in serve_ball
self.ball.center = self.center
AttributeError: 'NoneType' object has no attribute 'center'

D:\PyPong>main.py
[INFO ] [Logger ] Record log in C:\Users\Admin\.kivy\logs\kivy_20-09-20_2.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.13547 Compatibility Profile Context 25.20.15016.1002'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) Vega 3 Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File "D:\PyPong\main.py", line 88, in <module>
PongApp().run()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\app.py", line 829, in run
root = self.build()
File "D:\PyPong\main.py", line 83, in build
game.serve_ball()
File "D:\PyPong\main.py", line 43, in serve_ball
self.ball.center = self.center
AttributeError: 'NoneType' object has no attribute 'center'

D:\PyPong>main.py
[INFO ] [Logger ] Record log in C:\Users\Admin\.kivy\logs\kivy_20-09-20_3.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.13547 Compatibility Profile Context 25.20.15016.1002'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) Vega 3 Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File "D:\PyPong\main.py", line 88, in <module>
PongApp().run()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\app.py", line 829, in run
root = self.build()
File "D:\PyPong\main.py", line 83, in build
game.serve_ball()
File "D:\PyPong\main.py", line 43, in serve_ball
self.ball.center = self.center
AttributeError: 'NoneType' object has no attribute 'center'
 

Форум IT Специалистов