• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-PythonPrint customisation

Scheduled Pinned Locked Moved Solved Troubleshooting
46 Posts 5 Posters 14.0k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    karsten13 @sdetweil
    last edited by Apr 11, 2022, 6:15 PM

    @sdetweil

    yes, the docs … no native english speaker so docs are always a struggle. Thanks for the hints, will update …

    S 1 Reply Last reply Apr 11, 2022, 6:19 PM Reply Quote 1
    • S Offline
      sdetweil @karsten13
      last edited by Apr 11, 2022, 6:19 PM

      @karsten13 and I missed the latest/fat under the TAG column of your table… tldr(lol), my apologies

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • R Offline
        RobCee
        last edited by RobCee Apr 12, 2022, 10:37 AM Apr 12, 2022, 10:28 AM

        @sdetweil I have started fresh and am still having the same issue.
        New install of buster, fully updated.
        Installed all the MM and node successfully.
        MM runs as expected.
        Checked that python and python3 are both available to the OS.
        Added the MMM-PythonPrint to the modules dir.

        [12.04.2022 11:22.45.613] [LOG]   MMM-PythonPrint received a socket notification: CONFIG - Payload: [object Object]
        [12.04.2022 11:22.45.619] [ERROR] Whoops! There was an uncaught exception...
        [12.04.2022 11:22.45.640] [ERROR] ReferenceError: _this is not defined
            at Class.startit (/home/pi/MagicMirror/modules/MMM-PythonPrint/node_helper.js:27:24)
            at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-PythonPrint/node_helper.js:46:9)
            at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:109:11)
            at Socket.emit (node:events:390:28)
            at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
            at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:466:39
            at processTicksAndRejections (node:internal/process/task_queues:78:11)
        

        This is my config section:

        		{
        			module:"MMM-PythonPrint",
        			position:"center",
        			disabled:false,
        			config: {
        				// name of the python process to execute (could be python3)
        				pythonName: 'python',
        				// command file in module folder
        				// if false, YOU will provide the full path to the python program
        				localfolder: true,
        
        				// spawn a python pgm that writes over and over (timed maybe), but keeps running
        				command: 'printit.py',
        				repetative: true,
        
        				// spawn a one time output  script, but relaunch it every cycletime milliseconds
        
        				// repretative: false,
        				// command: 'printitonce.py',
        				cycletime: 2000,
        
        				// print debugging messages from the node_helper
        				debug: true
        			}
        		 },
        
        S 1 Reply Last reply Apr 12, 2022, 11:10 AM Reply Quote 0
        • S Offline
          sdetweil @RobCee
          last edited by Apr 12, 2022, 11:10 AM

          @RobCee weird, sorry, typo… fixed

          git pull to get the update

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          R 1 Reply Last reply Apr 12, 2022, 11:17 AM Reply Quote 0
          • R Offline
            RobCee @sdetweil
            last edited by Apr 12, 2022, 11:17 AM

            @sdetweil I found another, just up from that one - you have a missing ‘t’ in this line

            this.config.command=this.config.command.slice(his.config.pythonName.length)
            
            S 1 Reply Last reply Apr 12, 2022, 11:19 AM Reply Quote 0
            • S Offline
              sdetweil @RobCee
              last edited by Apr 12, 2022, 11:19 AM

              @RobCee fixed… bad day at the finger farm…yikes sorry

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • R Offline
                RobCee
                last edited by Apr 12, 2022, 11:20 AM

                But even with that _ removed, I am still getting an odd error:

                 TypeError: this.file is not a function
                
                S 1 Reply Last reply Apr 12, 2022, 11:28 AM Reply Quote 0
                • S Offline
                  sdetweil @RobCee
                  last edited by Apr 12, 2022, 11:28 AM

                  @RobCee ok, fixed, tested… sorry again
                  git pull

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  R 1 Reply Last reply Apr 12, 2022, 11:30 AM Reply Quote 0
                  • R Offline
                    RobCee @sdetweil
                    last edited by Apr 12, 2022, 11:30 AM

                    @sdetweil - apologies not necessary - I am just happy you are able to look at it.

                    Hurrah! It works!

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      diemen112
                      last edited by Jul 15, 2022, 12:52 PM

                      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?

                      S K 2 Replies Last reply Jul 15, 2022, 2:13 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 4 / 5
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy