Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: dynamic module does not define module export function (PyInit_rpds) #943

Open
khaleeljageer opened this issue Oct 4, 2024 · 1 comment

Comments

@khaleeljageer
Copy link

Versions

  • Python : 3.10.12
  • MacOS version : 14.7 (23H124)
  • XCode Version : 16.0
  • Cython version : 0.29.36

Describe the bug
Getting this error while running the application after successful build.

To Reproduce
git clone https://github.com/kivy/kivy-ios.git
cd kivy-ios/
python3 -m venv .venv
source .venv/bin/activate
toolchain.py build kivy
toolchain.py build python3

Expected behavior
Application should run without any crash

Logs

Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
Initializing python
<string>:1: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
Running main.py: /private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/YourApp/main.pyc
[INFO   ] [Logger      ] Record log in /private/var/mobile/Containers/Data/Application/2A67E2E9-D502-47C5-8605-A7B5C0CDAFF2/Documents/.kivy/logs/kivy_24-10-04_14.txt
[INFO   ] [Kivy        ] v2.3.0
[INFO   ] [Kivy        ] Installed at "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.11.6 (main, Oct  4 2024, 14:34:53) [Clang 16.0.0 (clang-1600.0.26.3)]
[INFO   ] [Python      ] Interpreter at "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/iotnode"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 195 symbols loaded
[INFO   ] [Image       ] Providers: img_imageio, img_tex, img_sdl2 (img_dds, img_ffpyplayer, img_pil ignored)
[INFO   ] [Window      ] Provider: sdl2
You need UIApplicationSupportsIndirectInputEvents in your Info.plist for mouse support
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'OpenGL ES 2.0 Metal - 100'>
[INFO   ] [GL          ] OpenGL vendor <b'Apple Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Apple A14 GPU'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 0
[INFO   ] [GL          ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO   ] [GL          ] Texture max size <4096>
[INFO   ] [GL          ] Texture max units <8>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
 Traceback (most recent call last):
   File "<string>", line 45, in load_module
   File "/Users/vijaykumarb/Documents/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_rpds_rpds)
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
   File "/Users/vijaykumarb/Documents/iotnode-ios/YourApp/main.py", line 9, in <module>
   File "/Users/vijaykumarb/Documents/iotnode-ios/YourApp/iotnode/app.py", line 27, in <module>
   File "/Users/vijaykumarb/Documents/iotnode-ios/YourApp/iotnode/configuration.py", line 15, in <module>
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/jsonschema/__init__.py", line 13, in <module>
     from jsonschema._format import FormatChecker
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/jsonschema/_format.py", line 11, in <module>
     from jsonschema.exceptions import FormatError
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/jsonschema/exceptions.py", line 15, in <module>
     from referencing.exceptions import Unresolvable as _Unresolvable
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/referencing/__init__.py", line 5, in <module>
     from referencing._core import Anchor, Registry, Resource, Specification
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/referencing/_core.py", line 9, in <module>
     from rpds import HashTrieMap, HashTrieSet, List
   File "/private/var/containers/Bundle/Application/25056DBE-599F-49AF-B974-68AADC398900/iotnode.app/lib/python3.11/site-packages/rpds/__init__.py", line 1, in <module>
     from .rpds import *
   File "<string>", line 49, in load_module
   File "/Users/vijaykumarb/Documents/dist/root/python3/lib/python3.11/imp.py", line 343, in load_dynamic
 ImportError: dynamic module does not define module export function (PyInit_rpds)
Application quit abnormally!
Leaving

Additional context
Using the same code base for Android build, it is working without any crash. But crashing in iOS platform.

@tcaduser
Copy link
Contributor

tcaduser commented Oct 7, 2024

Just guessing, but did try:

toolchain update myapp-ios

where myapp-ios is your app build directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants