python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

python for android support for charset_normalizer

Open Sahil-pixel opened this issue 1 year ago • 6 comments

02-21 15:37:05.571 16872 17050 I python : Android kivy bootstrap done. name is main 02-21 15:37:05.571 16872 17050 I python : AND: Ran string 02-21 15:37:05.571 16872 17050 I python : Run user program, change dir and execute entrypoint 02-21 15:37:06.056 16872 17050 I python : Traceback (most recent call last): 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/aiohttp/client_reqrep.py", line 70, in 02-21 15:37:06.057 16872 17050 I python : ModuleNotFoundError: No module named 'cchardet' 02-21 15:37:06.057 16872 17050 I python : 02-21 15:37:06.057 16872 17050 I python : During handling of the above exception, another exception occurred: 02-21 15:37:06.057 16872 17050 I python : 02-21 15:37:06.057 16872 17050 I python : Traceback (most recent call last): 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/app/main.py", line 12, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/aiohttp/init.py", line 6, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/aiohttp/client.py", line 59, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/aiohttp/client_reqrep.py", line 72, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/charset_normalizer/init.py", line 26, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/charset_normalizer/api.py", line 7, in 02-21 15:37:06.057 16872 17050 I python : File "/home/sahil/fxchatapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/fixchat/arm64-v8a/charset_normalizer/cd.py", line 16, in 02-21 15:37:06.057 16872 17050 I python : ImportError: dlopen failed: "/data/data/org.test.fixchat/files/app/_python_bundle/site-packages/charset_normalizer/md.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183) 02-21 15:37:06.057 16872 17050 I python : Python for android ended.

Sahil-pixel avatar Feb 21 '25 10:02 Sahil-pixel

@Sahil-pixel p4a.branch = develop

Clean build.

Novfensec avatar Feb 21 '25 10:02 Novfensec

@Sahil-pixel p4a.branch = develop

Clean build.

this is not solve the issue .

Sahil-pixel avatar Feb 23 '25 11:02 Sahil-pixel

@Sahil-pixel

Then you may build for multiple aarchs include x86_64 armeabi-v7a arm64-v8a in android.archs .

clean build is necessary to start over.

Basically the error implies that p4a built for x86_64 and its running on some other arch which is a bug. Develop branch solves the issue building for armeabi-v7a and arm64-v8 correctly.

Novfensec avatar Feb 23 '25 12:02 Novfensec

@Sahil-pixel

Then you may build for multiple aarchs include x86_64 armeabi-v7a arm64-v8a in android.archs .

clean build is necessary to start over.

Basically the error implies that p4a built for x86_64 and its running on some other arch which is a bug. Develop branch solves the issue building for armeabi-v7a and arm64-v8 correctly.

I was building for arm64-v8 only

Sahil-pixel avatar Feb 23 '25 13:02 Sahil-pixel

@Sahil-pixel

Then you may build for multiple aarchs include x86_64 armeabi-v7a arm64-v8a in android.archs .

clean build is necessary to start over.

Basically the error implies that p4a built for x86_64 and its running on some other arch which is a bug. Develop branch solves the issue building for armeabi-v7a and arm64-v8 correctly.

I was building for arm64-v8 only

Try adding armeabi-v7a;

android.archs = armeabi-v7a, arm64-v8a 

May be aiohttp have some c files which only support x86_64 arch.

That is aiohttp module only supports x86_64.

This is just an assumption.

Novfensec avatar Feb 23 '25 14:02 Novfensec

I saw it has build distributions separately for specific platforms.

There is an error during the build which is building for a different arch instead of the required one.

Novfensec avatar Feb 23 '25 14:02 Novfensec