Macrodroid Python File Running Error on Termux-Tasker Plugin

LinerSeven

Active member
Hi, every,

I'm trying to run a Python file "*.py" from Macrodroid using Termux's TaskerPlugin,
but even though the python file itself is ready to run on Termux via the Macrodroid Plugin, I get an error.
It does not occur on different mobilephone-termux...


What could be the cause of this?

Best regards,
Liner Seven
 

Attachments

  • Screenshot_20240324-231723.png
    Screenshot_20240324-231723.png
    76.9 KB · Views: 9
  • Screenshot_20240324-231739.png
    Screenshot_20240324-231739.png
    214.9 KB · Views: 9
  • Screenshot_20240324-231818.png
    Screenshot_20240324-231818.png
    193.5 KB · Views: 9
  • Screenshot_20240324-231854.png
    Screenshot_20240324-231854.png
    221.4 KB · Views: 8
  • Screenshot_20240324_232141.png
    Screenshot_20240324_232141.png
    264.2 KB · Views: 9

Endercraft

Moderator (& bug finder :D)
I imagine to make the python programs run you use a command like py file.py.
When you launch directly from the Termux:Tasker plugin the python program is interpreted as bash/sh. A simple fix is to create a .sh script containing the command you use to run the python programs.
 

LinerSeven

Active member
Hi, @Dimlos, @Endercraft, @mapriex,

I see! Shebang!
I was using #!bin/bash, so I'll try fixing it later. thank you!

By the way, I am trying the meross smart plug mss110, and found that the following spell is required when running meross-iot in Termux.

Before meloss-iot install by python on "Termux" commands as follows:
****meloss-iot:
****https://pypi.org/project/meross-iot/

pkg install python -y
pkg install xorgproto -y
pkg install python libcairo && pip install pycairo -y

export CFLAGS="-Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration"
pip install pycares
pip install setuptools


FYI :)

Best Regards,
Liner Seven
 

mapriex

Active member
i am used with reversed engineered kasa smart plugs to get access to the sensor datas. nice to see meross has a much bigger palete of getting sensor data devices like a garage opener or the humidity and temperature sensor.
 
Top