Read the statement by Michael Teeuw here.
MMM-PythonPrint customisation
-
But even with that _ removed, I am still getting an odd error:
TypeError: this.file is not a function
-
@RobCee ok, fixed, tested… sorry again
git pull -
@sdetweil - apologies not necessary - I am just happy you are able to look at it.
Hurrah! It works!
-
i have also the MM os and i try to make it work
I have added - /usr/bin/python3:/usr/bin/python3 to the docker compose
and now i have the error[15.07.2022 14:23.42.599] [LOG] MMM-PythonPrint received a socket notification: CONFIG - Payload: [object Object] [15.07.2022 14:23.42.602] [LOG] PythonPrint spawning /opt/magic_mirror/modules/MMM-PythonPrint/print_test.py using python3 [15.07.2022 14:23.42.686] [LOG] PythonPrint program error=Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x76fb37a0 (most recent call first):
a played around with adding $PYTHONHOME to env but without any result
does anyone know a work around to find the libraries? -
@diemen112 I think this answers
https://askubuntu.com/questions/905372/could-not-find-platform-independent-libraries-prefixrunning under docker is a fun experience?
did u install python as part of the container startup?
-
@diemen112 said in MMM-PythonPrint customisation:
I have added - /usr/bin/python3:/usr/bin/python3 to the docker compose
this will not work. You have to use the
fat
image, see my post above (Apr 11) -
Thank you for the help,
I made it work with adding some python dependent directory’s to the docker-compose file -
Sam,
Thank you for this MMM-PythonPrint. More than the sample module this really helped me follow how to wrap my head around how the script.js node_helper and anything else work together. The way you worded the variables and the input and output text really made sense and made it easy to follow what is happening. I am learning a lot. Again, Thank you.
Kelly
-
@kayakbabe awesome, glad it helped!
-
@sdetweil I’m looking at the configuration variable repetative and trying to figure out what it is for.
is this correct logic for true and false?
repetative: true
if your python script runs in a loop forever by itself so the spawn in node helper will just keep its connection to the python script openrepetative: false
if your python script runs one time, and you need node_helper to keep spawning over and over so you can get the info from the python script over and over