Ok now it is working,
it was a misunderstanding of the print output in the loaded script.
So there is no real output. The output was generated from and inside the callback.
So it is working now, without any warnings.
What is that with the absolute and relative path?
Must it a absolut? The relativ was not working on the first try.
Or what is the starting Point for the rel path? The working dir of the Script?
The output is generated from the process correclty but only collected when the process is finished (just shortly before the callback).
Thatās why you only see it only in your callback.
I think itās the relative path to the HABApp working directory.
C:\Development\python\python3.10\python.exe: can't open file 'C:\\Development\\SmartHome\\dev_habapp\\files\\lib\\files\\lib\\myspeedtest.py': [Errno 2] No such file or directory
C:\Development\python\python3.10\python.exe: can't open file 'C:\\Development\\SmartHome\\dev_habapp\\myspeedtest.py': [Errno 2] No such file or directory
So it is only working with the absolute path. If I enter something before myspeedtest.py
already files/lib is before in the path
Ok, thanks. Then I will wait until it is released m thanks for the support. And in general. I love it , habapp ist much more better for rules than JavaScript. From m Side of View.
Hi Sebastian,
I deleted my dev version and reinstalled it newly.
Then I tested the following:
'./lib/myspeedtest.py'
leads to
C:\Development\python\python3.10\python.exe: can't open file 'C:\\Development\\SmartHome\\dev_habapp\\files\\lib\\lib\\myspeedtest.py': [Errno 2] No such file or directory
and
'myspeedtest.py'
leads to
ERROR | C:\Development\python\python3.10\python.exe: can't open file 'C:\\Development\\SmartHome\\dev_habapp\\files\\myspeedtest.py': [Errno 2] No such file or directory
'lib/myspeedtest.py',
leads to
C:\Development\python\python3.10\python.exe: can't open file 'C:\\Development\\SmartHome\\dev_habapp\\files\\lib\\lib\\myspeedtest.py': [Errno 2] No such file or directory
on some reason if I add a path to the script the lib appears
'./files/lib/myspeedtest.py',
leads to
ERROR | Creating subprocess failed! Call: "C:\Development\SmartHome\dev_habapp\Scripts\python.exe" "./files/lib/myspeedtest.py" "arg1_for_script"
[2022-11-07 11:39:14,050] [ HABApp.execute] ERROR | Error [WinError 267] Der Verzeichnisname ist ungĆĀ¼ltig in execute_python:
Only the absolute Path is working.
Is there a chance to check if I downloaded the correct version?
I did:
python3 -m pip uninstall habapp
python3 -m pip install git+https://github.com/spacemanspiff2007/HABApp.git@Develop