• 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 15.4k 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.
  • S Offline
    sdetweil @RobCee
    last edited by Apr 11, 2022, 3:43 PM

    @RobCee right, you don’t have to change the code, just use the config.js setting

    { 
    module:
         config: {  
             pythonName:'python3',
        }
    }
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    R 1 Reply Last reply Apr 11, 2022, 3:44 PM Reply Quote 0
    • R Offline
      RobCee @sdetweil
      last edited by Apr 11, 2022, 3:44 PM

      @sdetweil ok, I will try it there then and see what happens.
      Tracking down errors in this MM OS is fun…

      S 1 Reply Last reply Apr 11, 2022, 3:57 PM Reply Quote 0
      • S Offline
        sdetweil @RobCee
        last edited by sdetweil Apr 11, 2022, 3:59 PM Apr 11, 2022, 3:57 PM

        @RobCee o, I see that I have a potential bug… if the command: is not configured,
        it defaults to “”… oops…

        I just pushed an update got that

        git pull in the module folder

        to debug

        add debug: true

        and then look where u start MM… (this doing npm start )

        [11.04.2022 10:55.13.087] [LOG]   MMM-PythonPrint received a socket notification: CONFIG - Payload: [object Object]
        [11.04.2022 10:55.13.087] [LOG]   PythonPrint spawning modules/MMM-PythonPrint/printit.py
        .
        .
        .
        .
        [11.04.2022 10:55.18.114] [LOG]   PythonPrint sending program output=hello
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Apr 11, 2022, 3:59 PM Reply Quote 0
        • R Offline
          RobCee @sdetweil
          last edited by Apr 11, 2022, 3:59 PM

          @sdetweil I will have a go with that, but I think I have a slightly different problem of my own making.

          S 1 Reply Last reply Apr 11, 2022, 4:04 PM Reply Quote 0
          • S Offline
            sdetweil @RobCee
            last edited by sdetweil Apr 11, 2022, 4:04 PM Apr 11, 2022, 4:04 PM

            @RobCee ok, I also fixed the use of the pythonName and added it to the debug message

            [11.04.2022 11:04.20.218] [LOG]   PythonPrint spawning modules/MMM-PythonPrint/printit.py using python3
            .
            .
            .
            .
            [11.04.2022 11:04.25.244] [LOG]   PythonPrint sending program output=hello
            

            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 11, 2022, 4:06 PM

              I’m not sure why, as I did manage to get it working at one point, but I think the issue is that I am using the MM OS Docker image to run all this.
              I think this means that the path expectations are different from the assumptions that I am making.
              I may have to give in and just build the whole thing manually - it will probably be quicker than trying to fault find the install, given it’s obfuscation.

              S 1 Reply Last reply Apr 11, 2022, 4:09 PM Reply Quote 0
              • S Offline
                sdetweil @RobCee
                last edited by Apr 11, 2022, 4:09 PM

                @RobCee yes, docker paths and if OUTSIDE the MM tree, then YOU have to add new volume statements to the docker setup to map them

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil yeah, I am deliberately keeping all the module paths in the default place, but it still doesn’t like it.
                  But if I go into the docker container, it doesn’t seem to have access to Python, so maybe that’s the problem.
                  It is all rather confusing. (More so from your end, no doubt)

                  S 2 Replies Last reply Apr 11, 2022, 4:11 PM Reply Quote 0
                  • S Offline
                    sdetweil @RobCee
                    last edited by sdetweil Apr 11, 2022, 4:14 PM Apr 11, 2022, 4:11 PM

                    @RobCee this.file(filename) will prepend the file system path to the module folder

                    I just pushed a fix to do the same in the module, instead of the __dirname prefix

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Apr 11, 2022, 4:15 PM Reply Quote 0
                    • R Offline
                      RobCee @sdetweil
                      last edited by Apr 11, 2022, 4:15 PM

                      @sdetweil But if I exec into a bash console in the docker container, it doesn’t seem to have access to Python, so maybe that’s the problem.
                      It is all rather confusing. (More so from your end, no doubt)

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 2 / 5
                      2 / 5
                      • First post
                        12/46
                        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