KivyMD v2 IOS runtime error ..PyInit_celeb()... (attempt 2)

27 views
Skip to first unread message

RDCB

unread,
Jul 10, 2024, 2:16:26 AM (7 days ago) Jul 10
to Kivy users support
This is a clearer version of my previous enquiry. Maybe delete that one.

  Hello

Using KivyMD 2.0.1.dev0 on IOS (simulation or actual device) I get the run-time error:-
<module>
     from .celebi import QuantizeCelebi
   File "<string>", line 49, in load_module
   File "/Users/rdcb/venv_test2/dist/root/python3/lib/python3.11/imp.py", line 343, in load_dynamic
 ImportError: dynamic module does not define module export function (PyInit_celebi)
Application quit abnormally!

In the same simple applications KivyMD v1.2 works ok.
From this it seems that v 2.0.1.dev0 is not yet ready for full use in released applications.

The app that fails under 2.0.1.dev0 but works under 1.2 is:-

from kivymd.app import MDApp
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput

kv = """
<TextTest>:
# orientation: 'horizontal'
orientation: 'vertical'
Button:
size_hint: 1, 0.95
text: 'test button'
MyTextInput:
id: text_input
size_hint: 0.5, None
text_hint: 'input message...'
multiline: True
height: self.minimum_height
"""

Builder.load_string(kv)


class MyTextInput(TextInput):
def on_text_validate(self):
App.get_running_app().root.ids.text_input.text = ''

def insert_text(self, substring, from_undo=False):
if substring == '\n':
substring = ''
self.dispatch('on_text_validate')
return super(MyTextInput, self).insert_text(substring, from_undo)


class TextTest(BoxLayout):
pass


class TestApp(App):
def build(self):
t = TextTest()
return t


if __name__ == '__main__':
TestApp().run()

Removing the reference to MDApp (ie the first line) means the app works on both versions.

This is only a problem under IOS.

Additional information given at run time:-
.
.
.
[INFO   ] [KivyMD      ] 2.0.1.dev0, git-f7bde69, 2024-02-27 (installed at "
.
.
.

 Traceback (most recent call last):
   File "<string>", line 45, in load_module
   File "/Users/rdcb/venv_test2/dist/root/python3/lib/python3.11/imp.py", line 343, in load_dynamic
   File "<frozen importlib._bootstrap>", line 721, in _load
   File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
   File "<frozen importlib._bootstrap>", line 573, in module_from_spec
   File "<frozen importlib._bootstrap_external>", line 1233, in create_module
   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
 ImportError: dynamic module does not define module export function (PyInit_materialyoucolor_quantize_celebi)
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
   File "/Users/rdcb/venv_test2/texttest2-ios/YourApp/main.py", line 1, in <module>
   File "/Users/rdcb/venv_test2/texttest2-ios/YourApp/kivymd/app.py", line 65, in <module>
   File "/Users/rdcb/venv_test2/texttest2-ios/YourApp/kivymd/theming.py", line 53, in <module>
   File "/Users/rdcb/Library/Developer/CoreSimulator/Devices/4021E3B5-A626-4450-AE19-020217A36538/data/Containers/Bundle/Application/34DD6F7E-5AB9-4BB7-92EE-64729FB20FC8/texttest2.app/lib/python3.11/site-packages/materialyoucolor/utils/platform_utils.py", line 23, in <module>
     from materialyoucolor.quantize import QuantizeCelebi
   File "/Users/rdcb/Library/Developer/CoreSimulator/Devices/4021E3B5-A626-4450-AE19-020217A36538/data/Containers/Bundle/Application/34DD6F7E-5AB9-4BB7-92EE-64729FB20FC8/texttest2.app/lib/python3.11/site-packages/materialyoucolor/quantize/__init__.py", line 1, in <module>
     from .celebi import QuantizeCelebi
   File "<string>", line 49, in load_module
   File "/Users/rdcb/venv_test2/dist/root/python3/lib/python3.11/imp.py", line 343, in load_dynamic
 ImportError: dynamic module does not define module export function (PyInit_celebi)
Application quit abnormally!
Leaving


I note that it was necessary to install 'materialyoucolor' for this kivy version (otherwise it gave a run-time error saying it was missing.

Any ideas gratefully received.









ELLIOT GARBUS

unread,
Jul 10, 2024, 10:23:42 AM (6 days ago) Jul 10
to Kivy users support
This looks like a known KivyMD issue. See: https://github.com/kivymd/KivyMD/issues/1637
Using the master version of kivy,kivy-ios and kivymd Unable to compile and run in xcode "/Users/**/Library/Developer/CoreSimulator/Devices/9F084B3B-7778-4433-99AB-8DF9A3E05CFA/data/Containers/Bundl...
A user suggests trying the newest recipe for kivy-ios.


From: kivy-...@googlegroups.com <kivy-...@googlegroups.com> on behalf of RDCB <robinba...@gmail.com>
Sent: Tuesday, July 9, 2024 11:16 PM
To: Kivy users support <kivy-...@googlegroups.com>
Subject: [kivy-users] KivyMD v2 IOS runtime error ..PyInit_celeb()... (attempt 2)
 
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/816c0148-2f9f-4816-a67d-698055ed6756n%40googlegroups.com.

Robin Barrett

unread,
Jul 11, 2024, 1:18:41 PM (5 days ago) Jul 11
to kivy-...@googlegroups.com
Thanks for finding that. It does have the fact that 'materialyoucolor' is involved in common.

The error I am getting is a run-time error from the IOS device (via XCode) rather than a build error.

My install (pipenv install kivy-ios presumably uses the kivy-ios recipe ?) was much later than the Mar 17th date mentioned.

I'd be interested to know if anyone at all has successfully run an IOS program using the KivyMD v2 at this point in time ?




 

Robin Barrett

unread,
Jul 11, 2024, 1:18:45 PM (5 days ago) Jul 11
to kivy-...@googlegroups.com
Thanks for finding that. It does have the fact that 'materialyoucolor' is involved in common.

The error I am getting is a run-time error from the IOS device (via XCode) rather than a build error.

My install (pipenv install kivy-ios presumably uses the kivy-ios recipe ?) was much later than the Mar 17th date mentioned.

I'd be interested to know if anyone at all has successfully run an IOS program using the KivyMD v2 at this point in time ?


On Thu, Jul 11, 2024 at 12:23 AM ELLIOT GARBUS <elli...@cox.net> wrote:
Message has been deleted

ElliotG

unread,
Jul 11, 2024, 1:36:37 PM (5 days ago) Jul 11
to Kivy users support
"I'd be interested to know if anyone at all has successfully run an IOS program using the KivyMD v2 at this point in time ?"

I'd suggest asking at the KivyMD discord or in the ios-support section on the Kivy discord.  I do not think there are many IOS devs in this forum.
Reply all
Reply to author
Forward
0 new messages