chaquo / chaquopy

Chaquopy: the Python SDK for Android
https://chaquo.com/chaquopy/
MIT License
748 stars 127 forks source link

file not found exception #1153

Closed saed220 closed 1 month ago

saed220 commented 1 month ago

Chaquopy version

Devices or emulators where the issue happens : memu emoulaito and galaxy note 8

Relevant parts of your code

Describe your issue

i try to use requests-htm with this plugin . everything is fine until requests-html download chromium and could not find that . i get this error on emoulator(memu):

com.chaquo.python.PyException: FileNotFoundError: [Errno 2] No such file or directory: '/data/user/0/com.vooo.mypackage/files/.local/share/pyppeteer/local-chromium/1181205/chrome-linux/chrome'
                                                                                                        at <python>.subprocess._execute_child(subprocess.py:1720)
                                                                                                        at <python>.subprocess.__init__(subprocess.py:858)
                                                                                                        at <python>.pyppeteer.launcher.launch(launcher.py:148)
                                                                                                        at <python>.pyppeteer.launcher.launch(launcher.py:307)
                                                                                                        at <python>.requests_html.browser(requests_html.py:714)
                                                                                                        at <python>.asyncio.base_events.run_until_complete(base_events.py:616)
                                                                                                        at <python>.requests_html.browser(requests_html.py:730)
                                                                                                        at <python>.requests_html.render(requests_html.py:586)

while the file downloaded completely and the pas and file exist in device. and iget this error in samsung galxy note 8:

com.chaquo.python.PyException: OSError: [Errno 8] Exec format error: '/data/user/0/com.vooo.mypackage/files/.local/share/pyppeteer/local-chromium/1181205/chrome-linux/chrome'
mhsmith commented 1 month ago

You can't run Linux executables on Android. And on newer Android versions you can't run any executables at all except those in your app's lib directory (#605).

What are you trying to accomplish here, and does it really need Chromium?

saed220 commented 1 month ago

thanks for your response . I try to scrap data from a dynamic website. I tryed java librarys like skrapit and html unit or js injection in android webview but non of them worked so as a solution I tryed to use reqests html library of python. I think request html use chroumum to load javascript data. is there any solution, if yes plese give me some advice i am not so familiar with python. is thre any alternative for request-html that can be run in android ?

mhsmith commented 1 month ago

Sorry, I don't know.