Я разрабатываю приложение на своем Raspberry3 с kivy 1.11.0.dev0, и все работает нормально. На прошлой неделе я купил другую Raspberry, и с тех пор я пытаюсь сохранить работоспособность программного обеспечения на этом без успеха. Я сделал одинаковые шаги в обеих системах, чтобы запустить kivy:
Понятия не имею, почему второй не работает. Обе системы используют Распбиана Джесси.
Выход рабочего:
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_18-11-02_1.txt
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil,
img_gif (img_ffpyplayer ignored)
[INFO ] [Kivy ] v1.11.0.dev0, git-0471549, 20180720
[INFO ] [Python ] v3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <gl>
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'>
[INFO ] [GL ] OpenGL vendor <b'Broadcom'>
[INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [HIDInput ] Read event from </dev/input/event0>
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [HIDInput ] Read event from </dev/input/event1>
[INFO ] [Base ] Start application main loop
[INFO ] [HIDMotionEvent] using <b'Lenovo Optical USB Mouse\x00
...
Вывод неисправного (с log_level: trace):
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_18-11-02_9.txt
[INFO ] [Kivy ] v1.11.0.dev0, git-ad7ec53, 20181102
[INFO ] [Python ] v3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1]
[INFO ] [Factory ] 184 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=None
[TRACE ] [Lang ] load file /usr/local/lib/python3.4/dist-packages/kivy/data/style.kv
[TRACE ] [Parser ] parsing 1291 lines
[TRACE ] [Parser ] got directive <kivy 1.0>
[TRACE ] [Builder ] build rule for <Label>
[TRACE ] [Builder ] build rule for <-Button,-ToggleButton>
[TRACE ] [Builder ] build rule for <BubbleContent>
[TRACE ] [Builder ] build rule for <BubbleButton>
[TRACE ] [Builder ] build rule for <Slider>
[TRACE ] [Builder ] build rule for <ProgressBar>
[TRACE ] [Builder ] build rule for <SplitterStrip>
[TRACE ] [Builder ] build rule for <Scatter>
[TRACE ] [Builder ] build rule for <RelativeLayout>
[TRACE ] [Builder ] build rule for <Image,AsyncImage>
[TRACE ] [Builder ] build rule for <EffectWidget>
[TRACE ] [Builder ] build rule for <TabbedPanelContent>
[TRACE ] [Builder ] build rule for <TabbedPanelStrip>
[TRACE ] [Builder ] build rule for <StripLayout>
[TRACE ] [Builder ] build rule for <TabbedPanelHeader>
[TRACE ] [Builder ] build rule for <Selector>
[TRACE ] [Builder ] build rule for <TextInput>
[TRACE ] [Builder ] build rule for <TextInputCutCopyPaste>
[TRACE ] [Builder ] build rule for <CodeInput>
[TRACE ] [Builder ] build rule for <TreeViewNode>
[TRACE ] [Builder ] build rule for <TreeViewLabel>
[TRACE ] [Builder ] build rule for <StencilView>
[TRACE ] [Builder ] build rule for <FileChooserListLayout>
[TRACE ] [Builder ] build rule for <FileChooserListView>
[TRACE ] [Builder ] build template for [FileListEntry@FloatLayout+TreeViewNode]
[TRACE ] [Builder ] build rule for <FileChooserIconLayout>
[TRACE ] [Builder ] build rule for <FileChooserIconView>
[TRACE ] [Builder ] build template for [FileIconEntry@Widget]
[TRACE ] [Builder ] build rule for <FileChooserProgress>
[TRACE ] [Builder ] build rule for <Switch>
[TRACE ] [Builder ] build rule for <ModalView>
[TRACE ] [Builder ] build rule for <Popup>
[TRACE ] [Builder ] build rule for <SpinnerOption>
[TRACE ] [Builder ] build rule for <Spinner>
[TRACE ] [Builder ] build rule for <ActionBar>
[TRACE ] [Builder ] build rule for <ActionView>
[TRACE ] [Builder ] build rule for <ActionSeparator>
[TRACE ] [Builder ] build rule for <ActionButton,ActionToggleButton>
[TRACE ] [Builder ] build rule for <ActionLabel>
[TRACE ] [Builder ] build rule for <ActionGroup>
[TRACE ] [Builder ] build rule for <ActionCheck>
[TRACE ] [Builder ] build rule for <ActionPreviousImage@Image>
[TRACE ] [Builder ] build rule for <ActionPreviousButton@Button>
[TRACE ] [Builder ] build rule for <ActionPrevious>
[TRACE ] [Builder ] build rule for <ActionGroup>
[TRACE ] [Builder ] build rule for <ActionOverflow>
[TRACE ] [Builder ] build rule for <ActionDropDown>
[TRACE ] [Builder ] build template for [AccordionItemTitle@Label]
[TRACE ] [Builder ] build rule for <AccordionItem>
[TRACE ] [Builder ] build rule for <SettingSpacer>
[TRACE ] [Builder ] build rule for <SettingItem>
[TRACE ] [Builder ] build rule for <SettingBoolean>
[TRACE ] [Builder ] build rule for <SettingString>
[TRACE ] [Builder ] build rule for <SettingPath>
[TRACE ] [Builder ] build rule for <SettingOptions>
[TRACE ] [Builder ] build rule for <SettingTitle>
[TRACE ] [Builder ] build rule for <SettingSidebarLabel>
[TRACE ] [Builder ] build rule for <SettingsPanel>
[TRACE ] [Builder ] build rule for <Settings>
[TRACE ] [Builder ] build rule for <InterfaceWithSidebar>
[TRACE ] [Builder ] build rule for <InterfaceWithSpinner>
[TRACE ] [Builder ] build rule for <MenuSpinner>
[TRACE ] [Builder ] build rule for <MenuSidebar>
[TRACE ] [Builder ] build rule for <ContentPanel>
[TRACE ] [Builder ] build rule for <InterfaceWithTabbedPanel>
[TRACE ] [Builder ] build rule for <ScrollView>
[TRACE ] [Builder ] build rule for <VideoPlayerPreview>
[TRACE ] [Builder ] build rule for <VideoPlayerAnnotation>
[TRACE ] [Builder ] build rule for <VideoPlayer>
[TRACE ] [Builder ] build rule for <CheckBox>
[TRACE ] [Builder ] build rule for <ScreenManager>
[TRACE ] [Builder ] build rule for <ColorPicker_Input@TextInput>
[TRACE ] [Builder ] build rule for <ColorPicker_Label@Label>
[TRACE ] [Builder ] build rule for <ColorPicker_Selector@BoxLayout>
[TRACE ] [Builder ] build rule for <ColorWheel>
[TRACE ] [Builder ] build rule for <ColorPicker>
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=None
[TRACE ] [Image ] Unable to use <gif> as loader!
[TRACE ]
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/kivy/core/__init__.py", line 129, in core_register_libs
level=0)
File "/usr/local/lib/python3.4/dist-packages/kivy/core/image/img_ffpyplayer.py", line 7, in <module>
import ffpyplayer
ImportError: No module named 'ffpyplayer'
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600
[INFO ] [Text ] Provider: sdl2
[TRACE ] [Parser ] parsing 19 lines
[TRACE ] [Builder ] build rule for <-CoverBehavior>
[DEBUG ] [App ] Loading kv <./test.kv>
[DEBUG ] [App ] kv <./test.kv> not found
[INFO ] [Window ] Provider: egl_rpi
[DEBUG ] [Window ] Actual display size: 1920x1080
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[DEBUG ] [GL ] glActiveTexture is not available
[DEBUG ] [GL ] glAttachShader is not available
[DEBUG ] [GL ] glBindAttribLocation is not available
[DEBUG ] [GL ] glBindBuffer is not available
[DEBUG ] [GL ] glBindFramebuffer is not available
[DEBUG ] [GL ] glBindRenderbuffer is not available
[DEBUG ] [GL ] glBindTexture is not available
[DEBUG ] [GL ] glBlendColor is not available
[DEBUG ] [GL ] glBlendEquation is not available
[DEBUG ] [GL ] glBlendEquationSeparate is not available
[DEBUG ] [GL ] glBlendFunc is not available
[DEBUG ] [GL ] glBlendFuncSeparate is not available
[DEBUG ] [GL ] glBufferData is not available
[DEBUG ] [GL ] glBufferSubData is not available
[DEBUG ] [GL ] glCheckFramebufferStatus is not available
[DEBUG ] [GL ] glClear is not available
[DEBUG ] [GL ] glClearColor is not available
[DEBUG ] [GL ] glClearStencil is not available
[DEBUG ] [GL ] glColorMask is not available
[DEBUG ] [GL ] glCompileShader is not available
[DEBUG ] [GL ] glCompressedTexImage2D is not available
[DEBUG ] [GL ] glCompressedTexSubImage2D is not available
[DEBUG ] [GL ] glCopyTexImage2D is not available
[DEBUG ] [GL ] glCopyTexSubImage2D is not available
[DEBUG ] [GL ] glCreateProgram is not available
[DEBUG ] [GL ] glCreateShader is not available
[DEBUG ] [GL ] glCullFace is not available
[DEBUG ] [GL ] glDeleteBuffers is not available
[DEBUG ] [GL ] glDeleteFramebuffers is not available
[DEBUG ] [GL ] glDeleteProgram is not available
[DEBUG ] [GL ] glDeleteRenderbuffers is not available
[DEBUG ] [GL ] glDeleteShader is not available
[DEBUG ] [GL ] glDeleteTextures is not available
[DEBUG ] [GL ] glDepthFunc is not available
[DEBUG ] [GL ] glDepthMask is not available
[DEBUG ] [GL ] glDetachShader is not available
[DEBUG ] [GL ] glDisable is not available
[DEBUG ] [GL ] glDisableVertexAttribArray is not available
[DEBUG ] [GL ] glDrawArrays is not available
[DEBUG ] [GL ] glDrawElements is not available
[DEBUG ] [GL ] glEnable is not available
[DEBUG ] [GL ] glEnableVertexAttribArray is not available
[DEBUG ] [GL ] glFinish is not available
[DEBUG ] [GL ] glFlush is not available
[DEBUG ] [GL ] glFramebufferRenderbuffer is not available
[DEBUG ] [GL ] glFramebufferTexture2D is not available
[DEBUG ] [GL ] glFrontFace is not available
[DEBUG ] [GL ] glGenBuffers is not available
[DEBUG ] [GL ] glGenerateMipmap is not available
[DEBUG ] [GL ] glGenFramebuffers is not available
[DEBUG ] [GL ] glGenRenderbuffers is not available
[DEBUG ] [GL ] glGenTextures is not available
[DEBUG ] [GL ] glGetActiveAttrib is not available
[DEBUG ] [GL ] glGetActiveUniform is not available
[DEBUG ] [GL ] glGetAttachedShaders is not available
[DEBUG ] [GL ] glGetAttribLocation is not available
[DEBUG ] [GL ] glGetBooleanv is not available
[DEBUG ] [GL ] glGetBufferParameteriv is not available
[DEBUG ] [GL ] glGetError is not available
[DEBUG ] [GL ] glGetFloatv is not available
[DEBUG ] [GL ] glGetFramebufferAttachmentParameteriv is not available
[DEBUG ] [GL ] glGetIntegerv is not available
[DEBUG ] [GL ] glGetProgramInfoLog is not available
[DEBUG ] [GL ] glGetProgramiv is not available
[DEBUG ] [GL ] glGetRenderbufferParameteriv is not available
[DEBUG ] [GL ] glGetShaderInfoLog is not available
[DEBUG ] [GL ] glGetShaderiv is not available
[DEBUG ] [GL ] glGetShaderSource is not available
[DEBUG ] [GL ] glGetString is not available
[DEBUG ] [GL ] glGetTexParameterfv is not available
[DEBUG ] [GL ] glGetTexParameteriv is not available
[DEBUG ] [GL ] glGetUniformfv is not available
[DEBUG ] [GL ] glGetUniformiv is not available
[DEBUG ] [GL ] glGetUniformLocation is not available
[DEBUG ] [GL ] glGetVertexAttribfv is not available
[DEBUG ] [GL ] glGetVertexAttribiv is not available
[DEBUG ] [GL ] glHint is not available
[DEBUG ] [GL ] glIsBuffer is not available
[DEBUG ] [GL ] glIsEnabled is not available
[DEBUG ] [GL ] glIsFramebuffer is not available
[DEBUG ] [GL ] glIsProgram is not available
[DEBUG ] [GL ] glIsRenderbuffer is not available
[DEBUG ] [GL ] glIsShader is not available
[DEBUG ] [GL ] glIsTexture is not available
[DEBUG ] [GL ] glLineWidth is not available
[DEBUG ] [GL ] glLinkProgram is not available
[DEBUG ] [GL ] glPixelStorei is not available
[DEBUG ] [GL ] glPolygonOffset is not available
[DEBUG ] [GL ] glReadPixels is not available
[DEBUG ] [GL ] glRenderbufferStorage is not available
[DEBUG ] [GL ] glSampleCoverage is not available
[DEBUG ] [GL ] glScissor is not available
[DEBUG ] [GL ] glShaderBinary is not available
[DEBUG ] [GL ] glShaderSource is not available
[DEBUG ] [GL ] glStencilFunc is not available
[DEBUG ] [GL ] glStencilFuncSeparate is not available
[DEBUG ] [GL ] glStencilMask is not available
[DEBUG ] [GL ] glStencilMaskSeparate is not available
[DEBUG ] [GL ] glStencilOp is not available
[DEBUG ] [GL ] glStencilOpSeparate is not available
[DEBUG ] [GL ] glTexImage2D is not available
[DEBUG ] [GL ] glTexParameterf is not available
[DEBUG ] [GL ] glTexParameteri is not available
[DEBUG ] [GL ] glTexSubImage2D is not available
[DEBUG ] [GL ] glUniform1f is not available
[DEBUG ] [GL ] glUniform1fv is not available
[DEBUG ] [GL ] glUniform1i is not available
[DEBUG ] [GL ] glUniform1iv is not available
[DEBUG ] [GL ] glUniform2f is not available
[DEBUG ] [GL ] glUniform2fv is not available
[DEBUG ] [GL ] glUniform2i is not available
[DEBUG ] [GL ] glUniform2iv is not available
[DEBUG ] [GL ] glUniform3f is not available
[DEBUG ] [GL ] glUniform3fv is not available
[DEBUG ] [GL ] glUniform3i is not available
[DEBUG ] [GL ] glUniform3iv is not available
[DEBUG ] [GL ] glUniform4f is not available
[DEBUG ] [GL ] glUniform4fv is not available
[DEBUG ] [GL ] glUniform4i is not available
[DEBUG ] [GL ] glUniform4iv is not available
[DEBUG ] [GL ] glUniformMatrix4fv is not available
[DEBUG ] [GL ] glUseProgram is not available
[DEBUG ] [GL ] glValidateProgram is not available
[DEBUG ] [GL ] glVertexAttrib1f is not available
[DEBUG ] [GL ] glVertexAttrib2f is not available
[DEBUG ] [GL ] glVertexAttrib3f is not available
[DEBUG ] [GL ] glVertexAttrib4f is not available
[DEBUG ] [GL ] glVertexAttribPointer is not available
[DEBUG ] [GL ] glViewport is not available
[INFO ] [GL ] Backend used <sdl2>
Я также пытался использовать sdl2
в качестве провайдера окон. Это работает, но слишком затягивает, и мне кажется, это не лучшее решение.
Через некоторое время мне кажется, что это проблема OpenGL. Изменение raspi-confg приводит к следующим результатам:
OpenGL = G1 GL (Full KMS)
: Результат:
черный экран, не работает, даже не с «startx» по SSH или с изменением памяти GPU
OpenGL = G2 GL (Fake KMS)
: Результат:
DEBUG = ... * не удалось добавить службу - уже используется?
OpenGL = G3 Legacy
: Результат:
DEBUG = ... Ошибка сегментации
Я много чего пробовал, например обновить прошивку с помощью sudo BRANCH=next rpi-update*
или переустановить все несколько раз, используя старые образы, новые образы, python3.5 и т. Д.
Отныне я понятия не имею, чтобы исправить эту ошибку. Конечно, я могу клонировать первое изображение, но моей целью было получить новое, «чистое» изображение
EDIT
Как и в обсуждении https://github.com/kivy/kivy/issues/6007, проблема в новой версии / обновлении Raspbian. Я переключился обратно на старую версию и теперь она работает нормально!
Другим решением может быть использование
os.environ['KIVY_GL_BACKEND'] = 'gl'