Speedtest-cli crushes App

26 views
Skip to first unread message

mostwanted

unread,
Aug 16, 2023, 4:16:06 AM8/16/23
to Kivy users support
How is speedtest-cli packaged together with a mobile app such that it works from a mobile device?

I'm using speedtetst-cli for internet testing in my app, its working properly on the desktop but cryshes the app after installation on the mobile device with adb-tool log error that says:

lds/python3/arm64-v8a__ndk_target_21/python3/Lib/subprocess.py", line 1847, in _execute_child
08-16 09:53:34.976 30140 30207 I python  :  FileNotFoundError: [Errno 2] No such file or directory: 'speedtest-cli'

When packaging the app i included speedtest-cli in the buildozer.specs requirements thinking it'll get installed:

Here are the class & function that use it, what am i doing wrong and what is the right way of going about it or if there is a better tool and easier tool to use please suggest it to me:
import subprocess
class SpeedTesting(Screen):
    def on_enter(self, *args):
        # This method is automatically called when the SpeedTesting screen is entered
        self.internetSpeed()

    def internetSpeed(self):
        # Show loading messages and activate the spinner
        self.ids.download_speed_label.text = "Testing Download Speed..."
        self.ids.upload_speed_label.text = "Testing Upload Speed..."
        self.ids.spinner.active = True

        # Run the speed test asynchronously using subprocess.Popen
        self.proc = subprocess.Popen(['speedtest-cli', '--json'], stdout=subprocess.PIPE, text=True)
        Clock.schedule_interval(self.check_speedtest_complete, 0.1)

Regards;

Robert

unread,
Aug 16, 2023, 1:17:49 PM8/16/23
to Kivy users support
The clue is "cli" which is "command line interface"
This means something is depending on an executable, that not installed.
The desktop model for executable paths does not apply (except a few system commands)

Para  3 https://github.com/Android-for-Python/Android-for-Python-Users#posix 

mostwanted

unread,
Aug 16, 2023, 11:34:45 PM8/16/23
to Kivy users support
Any suggestions on a tool to use?

elli...@cox.net

unread,
Aug 17, 2023, 12:06:01 AM8/17/23
to kivy-...@googlegroups.com

I’ve not used it but looking at the Speedtest-cli git hub, it has a python api.

Try using the python api directly, rather that using the CLI interface with sub-process.

Read: https://github.com/sivel/speedtest-cli/wiki

--
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/87ddc8e8-5d13-4a01-a4dc-fe7267a55ef1n%40googlegroups.com.

mostwanted

unread,
Aug 17, 2023, 9:22:33 AM8/17/23
to Kivy users support
thank you
Reply all
Reply to author
Forward
0 new messages