Git Product home page Git Product logo

panda3d-kivy's People

Contributors

cheaterman avatar francotonutti avatar moguri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

panda3d-kivy's Issues

Dropdown and popup widgets use Kivy Window and not PandaWindow

Using the dropdown widget, there is an issue at line 216 (in kivy.uix.dropdown) :

     Window.bind(
        on_key_down=self.on_key_down,
        size=self._reposition)

With Window imported (l.99):
from kivy.core.window import Window

Bind is not possible because Window is None. I assume that in panda3d_kivy, Window should be replaced by PandaWindow. A "workaround" is possible by commenting these lines but this should (as far as I can understand) prevent use of keys for this widget.

There is (as far as I can understand) the same issue for the popup widget (line 254 in kivy.uix.popup):
Window.add_widget(layout)
and Window imported as (line 236):
from kivy.core.window import Window
For the popup issue, the logfile indicates:
Output in log file:
[WARNING] [ModalView ] cannot open view, no window found.

'Esc' key is causing issue in any panda3d-kivy application

For any application in panda3d-kivy, pressing the 'Esc' key leads to this message and the application not stopping (which I imagine this should be the case):

[INFO   ] Base: Leaving application in progress...
[ERROR  ] Base: No event listeners have been created
[ERROR  ] Base: Application will leave
[ERROR  ] Base: No event listeners have been created
[ERROR  ] Base: Application will leave

[ERROR  ] [Base        ] Application will leave
[ERROR  ] [Base        ] No event listeners have been created
[ERROR  ] [Base        ] Application will leave
[ERROR  ] [Base        ] No event listeners have been created
[ERROR  ] [Base        ] Application will leave
[ERROR  ] [Base        ] No event listeners have been created
[ERROR  ] [Base        ] Application will leave
[ERROR  ] [Base        ] No event listeners have been created
[ERROR  ] [Base        ] Application will leave

Panda3d crashes when setting threading model (only python 3.9)

I was experiencing crashes with panda3d (any newer version), kivy (tested 2.1.0, 2.0.0) and panda3d_kivy (0.3.0, 0.4.0) when running my application with python 3.9 (tested 3.9.5, 3.9.12). Everything worked just fine with python 3.7.5. Unfortunately, I wasn't getting any sensible logging output since it just crashed without any warning.

Though, I found out that these crashes are related to a custom threading model that is set in my application (e.g., loadPrcFileData('', "threading-model cull/draw" or loadPrcFileData('', "threading-model Cull")).

Does anyone know if this can be fixed? I think this bug is at least somehow related to panda3d-kivy because I do not get crashes when removing all panda3d-kivy-related imports. The app even crashes when I do not add anything but imports.

display_region problems

If using the basic example from readme with the display_region option
display_region=self.win.make_display_region(0, 1, 0, 1)
then everything is fine. However if changing the values e.g. to (0, 1, 0, 0.5), the button cannot be clicked, while with (0, 0.5, 0, 1) it is still working.

Crash on MacOS

The basic example from the readme crashes on MacOS for me. (Panda3D and kivy on their own are working). The Kivy log follows and I have appended the crash report.

[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/kivy/init.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/usr/local/bin/python3.7"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used

crash report.txt

[Desktop packaging] Compiled application error. Unable to import kivy._clock

I use this lib in the following project

https://github.com/FrancoTonutti/Calculo-UTN-FRP

After trying to compile with python setup.py bdist_apps, the generated .exe doesn't work

I think the error is due to the following, but I don't know how to compile panda3d and kivy at the same time

[ERROR ] [Clock ] Unable to import kivy._clock. Have you perhaps forgotten to compile kivy? Kivy contains Cython code which needs to be compiled. A missing kivy._clock often indicates the Cython code has not been compiled. Please follow the installation instructions and make sure to compile Kivy

output.log:
[ERROR  ] [Core        ] error while reading localconfiguration
Traceback (most recent call last):
  File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\config.py", line 703, in <module>
  File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\config.py", line 469, in read
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 857, in items
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 857, in <listcomp>
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 854, in <lambda>
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 394, in before_get
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 444, in _interpolate_some
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%y-%m-%d_%_.txt'
[ERROR  ] Error while activating FileHandler logger
Traceback (most recent call last):
  File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\logger.py", line 234, in emit
  File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\logger.py", line 165, in _configure
  File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\config.py", line 501, in get
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 799, in get
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 394, in before_get
  File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\ConfigParser.py", line 444, in _interpolate_some
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%y-%m-%d_%_.txt'
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\win32\CalculoUTN.exe"
[INFO   ] [Python      ] v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 09:44:33) [MSC v.1900 32 bit (Intel)]
[INFO   ] [Python      ] Interpreter at "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\win32\CalculoUTN.exe"
[ERROR  ] [Clock       ] Unable to import kivy._clock. Have you perhaps forgotten to compile kivy? Kivy contains Cython code which needs to be compiled. A missing kivy._clock often indicates the Cython code has not been compiled. Please follow the installation instructions and make sure to compile Kivy
 Traceback (most recent call last):
   File "main.py", line 5, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\app\user_interface\main_ui.py", line 1, in <module>
     from panda3d_kivy.app import App
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\panda3d_kivy-0.1.2-py3-none-any.whl\panda3d_kivy\app.py", line 2, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\panda3d_kivy-0.1.2-py3-none-any.whl\panda3d_kivy\core\window.py", line 5, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\app.py", line 319, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\base.py", line 26, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "D:\Bibliotecas\Documentos\Python 3\UTN\Calculo-UTN-FRP-master\build\__whl_cache__\win32_cp37m\Kivy-1.11.1-cp37-cp37m-win32.whl\kivy\clock.py", line 363, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
     module = _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 819, in exec_module
     exec(code, module.__dict__)
   File "kivy._clock", line 1, in <module>
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 342, in load_dynamic
     return _load(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 696, in _load
     return _load_unlocked(spec)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
     spec.loader.exec_module(module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap_external.py", line 1050, in exec_module
     _bootstrap._call_with_frames_removed(_imp.exec_dynamic, module)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 219, in _call_with_frames_removed
     return f(*args, **kwds)
   File "kivy\_clock.pyx", line 9, in init kivy._clock
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 983, in _find_and_load
     return _find_and_load_unlocked(name, import_)
   File "C:\Users\Usuario\AppData\Local\Programs\Python\Python37-32\lib\importlib\_bootstrap.py", line 965, in _find_and_load_unlocked
     raise ModuleNotFoundError(_ERR_MSG.format(name), name=name)
 ModuleNotFoundError: No module named 'kivy.weakmethod'

P3D outputs a GL error when the checkbox color is not defined with 4 components

When using this .kv file, P3D outputs a GL error.

#.kv file of main.py file 

#: import CheckBox kivy.uix.checkbox 

# giving colour to lable 
<CustLabel@Label>: 
	color: .761, .190, .810, 1

<SampBoxLayout>: 
	orientation: "vertical"
	padding: 10
	spacing: 10

	CustLabel: 
		text: "Gender"
		size_hint_x: 1
		font_size:20

	# creating box layout 
	BoxLayout: 
		# assigning orentation 
		orientation: "horizontal"
		height: 20

		BoxLayout: 
			orientation: "horizontal"
			size_hint_x: .22

			# label creation 
			CustLabel: 
				text: "Male"
				size_hint_x: .80
				font_size:30
			CheckBox: 
				**color:.294, .761, .623**
				on_active: root.checkbox_click(self, self.active) 
				size_hint_x: .20

GL error:
:display:gsg:glgsg(error): glUniform3f has failed to set the uniform at location '0': the uniform's type, component size, or matrix dimensions are incompatible with the function variant (GL_INVALID_OPERATION)

Issue is that the checkbox color (see ** **) is defined with 3 components. Setting the alpha component solves this issue.

Not sure if something could be done to 1/ raise a proper warning or 2/ put a default alpha component to 1.0

TextInput error because of Window

Hi everyone,

did anyone encounter problems when using Kivy's TextInput with an panda3d-embedded Kivy app?

I get the following error and the focus stays active after clicking an input field once and for most fields I can not even change the content.

 Traceback (most recent call last):
   File "C:\python39\lib\site-packages\panda3d_kivy\core\window.py", line 273, in update_kivy
     EventLoop.idle()
   File "C:\python39\lib\site-packages\kivy\base.py", line 383, in idle
     self.dispatch_input()
   File "C:\python39\lib\site-packages\kivy\base.py", line 334, in dispatch_input
     post_dispatch_input(*pop(0))
   File "C:\python39\lib\site-packages\kivy\base.py", line 263, in post_dispatch_input
     listener.dispatch('on_motion', etype, me)
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\panda3d_kivy\core\window.py", line 357, in on_motion
     super().on_motion(event_type, motion_event)
   File "C:\python39\lib\site-packages\kivy\core\window\__init__.py", line 1664, in on_motion
     self.dispatch('on_touch_up', me)
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\core\window\__init__.py", line 1701, in on_touch_up
     if w.dispatch('on_touch_up', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\modalview.py", line 281, in on_touch_up
     super().on_touch_up(touch)
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 611, in on_touch_up
     if child.dispatch('on_touch_up', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 611, in on_touch_up
     if child.dispatch('on_touch_up', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 611, in on_touch_up
     if child.dispatch('on_touch_up', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\scrollview.py", line 968, in on_touch_up
     if self.dispatch('on_scroll_stop', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\scrollview.py", line 1005, in on_scroll_stop
     self.simulate_touch_down(touch)
   File "C:\python39\lib\site-packages\kivy\uix\scrollview.py", line 668, in simulate_touch_down
     ret = super(ScrollView, self).on_touch_down(touch)
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
     if child.dispatch('on_touch_down', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
     if child.dispatch('on_touch_down', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
     if child.dispatch('on_touch_down', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
     if child.dispatch('on_touch_down', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
     if child.dispatch('on_touch_down', touch):
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\textinput.py", line 1541, in on_touch_down
     if super().on_touch_down(touch):
   File "C:\python39\lib\site-packages\kivy\uix\behaviors\focus.py", line 462, in on_touch_down
     self.focus = True
   File "kivy\properties.pyx", line 520, in kivy.properties.Property.__set__
   File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
   File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "C:\python39\lib\site-packages\kivy\uix\behaviors\focus.py", line 402, in _on_focus
     self._bind_keyboard()
   File "C:\python39\lib\site-packages\kivy\uix\textinput.py", line 3011, in _bind_keyboard
     Window.bind(on_textedit=self.window_on_textedit)
 AttributeError: 'NoneType' object has no attribute 'bind'
:util(error): Exception occurred in PythonCallbackObject
 Exception ignored on calling ctypes callback function: <bound method WM_PenProvider._pen_wndProc of <kivy.input.providers.wm_pen.WM_PenProvider object at 0x0000017B0BC5F070>>

When binding the keyboard to the input field, Kivy tries to bind/unbind on_textedit to/from Window which is None in my case. In other places of kivy they usually use EventLoop.window. Though, if I just delete those lines, it works as expected except that key input is still being sent to the whole window as well. Replacing Window with EventLoop.window does not really change much compared to not having this line at all.

https://github.com/kivy/kivy/blob/01049a8f4536f42a5129e62863053c1a274e8665/kivy/uix/textinput.py#L3016
https://github.com/kivy/kivy/blob/01049a8f4536f42a5129e62863053c1a274e8665/kivy/uix/textinput.py#L3020

Am I doing something wrong?

Regs.
Thomas

Issue with kivy.version.__version__ in app.py

After upgrading to 0.2.1(latest version as of 10/31):

I got:

Traceback (most recent call last):

   File "...\Panda3D-1.10.7-x64\python\lib\site-packages\panda3d_kivy\app.py", line 44, in init_window
     self.run()  # root shouldn't be set before run() is called
   File "...\Panda3D-1.10.7-x64\python\lib\site-packages\panda3d_kivy\app.py", line 64, in run
     version, *_ = kivy.parse_kivy_version(kivy.version.__version__)
AttributeError: 'str' object has no attribute '__version__'

Seems that kivy.version returns a string.

Thanks!

Kivy is not starting when P3D threading model is activated

When using the P3D threading model in the config file:
threading-model Cull/Draw or even threading-model /Draw

Kivy is not starting and displays this message (from the log file):

[INFO ] Logger: Record log in .kivy\logs\kivy_20-03-22_3.txt
[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 "\Panda3D-1.10.6-x64\python\lib\site-packages\kivy_init_.py"
[INFO ] Python: v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]
[INFO ] Python: Interpreter at "\Panda3D-1.10.6-x64\python\python.exe"
[INFO ] Factory: 184 symbols loaded
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] Text: Provider: sdl2
[INFO ] GL: Using the "OpenGL" graphics system
[ERROR ] GL: GLEW initialization error b'Missing GL version'

Typing an Underscore in a TextInput Causes a Crash

I have discovered that typing an underscore crashes the application. However, I have found and fixed the bug by changing line 208 of "core/window.py" from modifier, text = text.split('-') to modifier, text = text.split('-', maxsplit = 1). This bug is caused because when typing an underscore char, the "text" variable contains the value "Shift--" which gets split into 3 strings instead of the expected 2 strings.

DLL import error on Windows

On Windows (and P3D version 1.10.5), the basic example is not working and create a DLL import error:

[INFO   ] Logger: Record log in \.kivy\logs\kivy_20-03-01_11.txt
[INFO   ] Kivy: v1.11.1
[INFO   ] Kivy: Installed at "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\__init__.py"
[INFO   ] Python: v3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
[INFO   ] Python: Interpreter at "\Panda3D-1.10.5-x64\python\ppython.exe"
[INFO   ] Factory: 184 symbols loaded
[DEBUG  ] Cache: register <kv.lang> with limit=None, timeout=None
[DEBUG  ] Cache: register <kv.image> with limit=None, timeout=60
[DEBUG  ] Cache: register <kv.atlas> with limit=None, timeout=None
[DEBUG  ] image: Failed trying to import the "sdl2" provider from "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\core\image\_img_sdl2.cp37-win_amd64.pyd". This error is often encountered when a dependency is missing, or if there are multiple copies of the same dependency dll on the Windows PATH and they are incompatible with each other. This can occur if you are mixing installations (such as different python installations, like anaconda python and a system python) or if another unrelated program added its directory to the PATH. Please examine your PATH and python installation for potential issues. To further troubleshoot a "DLL load failed" error, please download "Dependency Walker" (64 or 32 bit version - matching your python bitness) from dependencywalker.com and set the environment variable KIVY_SDL2_DEPENDENCY_WALKER to the full path of the downloaded depends.exe file and rerun your application to generate an error report
[INFO   ] Image: Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[DEBUG  ] Cache: register <kv.texture> with limit=1000, timeout=60
[DEBUG  ] Cache: register <kv.shader> with limit=1000, timeout=3600
[DEBUG  ] Window: Provider <sdl2> ignored by config
[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
 
[INFO   ] GL: Using the "OpenGL" graphics system
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr:   File "KivyTests.py", line 103, in <module>
[WARNING] stderr:     PandaApp().run()
[WARNING] stderr:   File "KivyTests.py", line 57, in __init__
[WARNING] stderr:     panda_app=self,
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\panda3d_kivy\app.py", line 18, in __init__
[WARNING] stderr:     panda_app=panda_app,
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\panda3d_kivy\core\window.py", line 152, in __init__
[WARNING] stderr:     super().__init__(**kwargs)
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\core\window\__init__.py", line 981, in __init__
[WARNING] stderr:     self.create_window()
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\core\window\__init__.py", line 1254, in create_window
[WARNING] stderr:     self.initialize_gl()
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\core\window\__init__.py", line 1225, in initialize_gl
[WARNING] stderr:     ignored=self.gl_backends_ignored)
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy\core\gl\__init__.py", line 38, in init_gl
[WARNING] stderr:     gl_init_symbols(allowed, ignored)
[WARNING] stderr:   File "kivy\graphics\opengl.pyx", line 1556, in kivy.graphics.opengl.gl_init_symbols
[WARNING] stderr:   File "kivy\graphics\cgl.pyx", line 99, in kivy.graphics.cgl.cgl_init
[WARNING] stderr:   File "\Panda3D-1.10.5-x64\python\lib\importlib\__init__.py", line 127, in import_module
[WARNING] stderr:     return _bootstrap._gcd_import(name[level:], package, level)
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 583, in module_from_spec
[WARNING] stderr:   File "<frozen importlib._bootstrap_external>", line 1043, in create_module
[WARNING] stderr:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[WARNING] stderr: ImportError: DLL load failed: module specified can not be found.

Latest kivy version (2.1.0) prevents 3D objects to be displayed

Installing panda3d-kivy 0.3.0 makes the installation of the latest kivy version (2.1.0).

With the 2.1.0 version :

  • kivy uix objects are displayed
  • 2D objects such as TextNode are displayed
  • but no 3D objects are displayed (only a black screen)

With the downgrade to kivy 2.0.0, the 3D objects are displayed again.

Tested also with the 'movement' sample provided in the source code.

Specs:
panda3d 1.10.11 - x64
panda3d-kivy 0.3.0 (pip installed)
Python 3.7.9
OS: Windows 11
3080 TI mobile

I just want to say, you are AWESOME!

There I was learning panda3d, and thinking about using kivy for the GUI, because I knew kivy from before and thought it would be awesome combo 🔥 . And then I found your package. Mister Cheaterman, you are AWESOME. Thank you!

This is not really an issue, sorry. I just needed to say it. Thank you! 🔥

Window is None when using the settings widget with a non boolean value

When using the Settings widget, with a numeric or a string (in a settings_custom.json file):

 {
        "type": "numeric",
        "title": "FPS",
        "desc": "Max FPS",
        "section": "graphics",
        "key": "maxfps"
    }   

then the settings.py raises an exception due to Window being None (line 391):

File "kivy_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
File "kivy_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
File "kivy_event.pyx", line 1138, in kivy._event.EventObservers._dispatch
File "\Panda3D-1.10.6-x64\python\lib\site-packages\kivy\uix\settings.py", line 391, in _create_popup
popup_width = min(0.95 * Window.width, dp(500))
AttributeError: 'NoneType' object has no attribute 'width'

There is no issue with a boolean value.

I suspect this is exactly the same issue as the one for pop up / spinner.

P3D displays a GL error message when P3D config. var. gl-version is set above 3 0

Using the configuration variable in Panda3d (used to setup a particular GL context):
gl-version 4 3

makes P3D/kivy throwing an error in the console (even if the program works):
(details obtained by setting the gl-debug #t in the config variables of P3D):

[INFO ] [Logger ] Record log in .kivy\logs\kivy_20-03-15_20.txt
[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 "\Panda3D-1.10.5-x64\python\lib\site-packages\kivy_init_.py"
[INFO ] [Python ] v3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "\Panda3D-1.10.5-x64\python\ppython.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
:display:windisplay(warning): SetForegroundWindow() failed!
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
:display:gsg:glgsg(error): Using glGetString in a Core context with parameter and enum '0x1f03' which was removed from Core OpenGL (GL_INVALID_ENUM)
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'4.3.13399 Core Profile/Debug Context 15.201.1151.1008'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Mobility Radeon HD 5800 Series'>
[INFO ] [GL ] OpenGL parsed version: 4, 3
[INFO ] [GL ] Shading version <b'4.40'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <18>
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
:display:gsg:glgsg(error): Using glGetString in a Core context with parameter and enum '0x1f03' which was removed from Core OpenGL (GL_INVALID_ENUM)
[INFO ] [GL ] NPOT texture support is available
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
:display:gsg:glgsg(error): glUniformMatrix4fv has failed because the operation requires a currently active program object (GL_INVALID_OPERATION)
….again and again….

Setting the config variable until gl-version 3 0 makes P3D/kivy not issuing any error in the console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.