sdl2 - TypeError: expected bytes, str found

264 views
Skip to first unread message

Michael Ebstyne

unread,
Jul 19, 2015, 1:43:27 PM7/19/15
to kivy-...@googlegroups.com
I'm having issues with new sdl2 provider for Windows. I'm hoping someone can point me in the right direction.

Repro:
1. Download Python 3.4.
4. Run:

class MyApp(App):
def build(self):
return Button(text='Hello World')

MyApp().run()


Output:

[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[CRITICAL          ] [Window      ] Unable to find any valuable Window provider at all!
sdl2 - TypeError: expected bytes, str found
  File "C:\Users\Michael\.virtualenvs\home\lib\site-packages\kivy\core\__init__.py", line 65, in core_select_lib
    cls = cls()
  File "C:\Users\Michael\.virtualenvs\home\lib\site-packages\kivy\core\window\window_sdl2.py", line 121, in __init__
    super(WindowSDL, self).__init__()
  File "C:\Users\Michael\.virtualenvs\home\lib\site-packages\kivy\core\window\__init__.py", line 616, in __init__
    self.create_window()
  File "C:\Users\Michael\.virtualenvs\home\lib\site-packages\kivy\core\window\window_sdl2.py", line 171, in create_window
    self.fullscreen, resizable, state)
  File "kivy\core\window\_window_sdl2.pyx", line 60, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy\core/window\_window_sdl2.c:1352)

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


I know gohlke distribution is "unofficial" that said... it's popular. I'm wondering what I'm missing?

Thanks,

m


Leif Theden

unread,
Jul 30, 2015, 1:53:13 AM7/30/15
to Kivy users support, mebs...@me.com
Its most likely related to the build process used there.  According to the following, this particular issue is caused when the python2 build is done first, followed by the python3 build, without clearing the build files from the python2 build first.  The solution seems to change the build process used by gohlke.

https://github.com/kivy/kivy/issues/3225
Reply all
Reply to author
Forward
0 new messages