MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Extra
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 14
    • Groups 0

    Posts

    Recent Best Controversial
    • Help. MM doesn't work Anymore

      Hello,

      I had installed a module called on-this-day and now my MM doesn’t work. I uninstalled it and it still doesn’t work. I get this error:

      > magicmirror@2.18.0 start
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [22.01.2022 20:01.34.583] [LOG]   Starting MagicMirror: v2.18.0
      [22.01.2022 20:01.34.621] [LOG]   Loading config ...
      [22.01.2022 20:01.34.650] [LOG]   Loading module helpers ...
      [22.01.2022 20:01.34.661] [LOG]   No helper found for module: alert.
      [22.01.2022 20:01.34.746] [LOG]   Initializing new module helper ...
      [22.01.2022 20:01.34.751] [LOG]   Module helper loaded: updatenotification
      [22.01.2022 20:01.34.757] [LOG]   No helper found for module: clock.
      [22.01.2022 20:01.36.053] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
      Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
      [22.01.2022 20:01.36.058] [LOG]   Loading module helpers ...
      [22.01.2022 20:01.36.062] [LOG]   No helper found for module: alert.
      [22.01.2022 20:01.36.066] [LOG]   Initializing new module helper ...
      [22.01.2022 20:01.36.068] [LOG]   Module helper loaded: updatenotification
      [22.01.2022 20:01.36.072] [LOG]   No helper found for module: clock.
      [22.01.2022 20:01.36.215] [ERROR] App threw an error during load
      [22.01.2022 20:01.36.218] [ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
      Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:11:15)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/node_helper.js:8:25)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at loadModule (/home/pi/MagicMirror/js/app.js:127:19)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
          at loadModule (/home/pi/MagicMirror/js/app.js:144:6)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at loadModules (/home/pi/MagicMirror/js/app.js:176:3)
          at /home/pi/MagicMirror/js/app.js:225:4
          at loadConfig (/home/pi/MagicMirror/js/app.js:81:4)
          at App.start (/home/pi/MagicMirror/js/app.js:212:3)
          at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:153:7)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at loadApplicationPackage (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:110:16)
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:222:9)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (node:electron/js2c/browser_init:193:3197)
          at Object../lib/browser/init.ts (node:electron/js2c/browser_init:193:3401)
          at __webpack_require__ (node:electron/js2c/browser_init:1:128)
          at node:electron/js2c/browser_init:1:1200
          at node:electron/js2c/browser_init:1:1267
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
      [22.01.2022 20:01.36.224] [ERROR] Whoops! There was an uncaught exception...
      [22.01.2022 20:01.36.282] [ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
      Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:11:15)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/node_helper.js:8:25)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at loadModule (/home/pi/MagicMirror/js/app.js:127:19)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
          at loadModule (/home/pi/MagicMirror/js/app.js:144:6)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at /home/pi/MagicMirror/js/app.js:167:6
          at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
          at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
          at loadModules (/home/pi/MagicMirror/js/app.js:176:3)
          at /home/pi/MagicMirror/js/app.js:225:4
          at loadConfig (/home/pi/MagicMirror/js/app.js:81:4)
          at App.start (/home/pi/MagicMirror/js/app.js:212:3)
          at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:153:7)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at loadApplicationPackage (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:110:16)
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:222:9)
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          at Object.<anonymous> (node:electron/js2c/browser_init:193:3197)
          at Object../lib/browser/init.ts (node:electron/js2c/browser_init:193:3401)
          at __webpack_require__ (node:electron/js2c/browser_init:1:128)
          at node:electron/js2c/browser_init:1:1200
          at node:electron/js2c/browser_init:1:1267
          at Function.c._load (node:electron/js2c/asar_bundle:5:13331) {
        code: 'ERR_REQUIRE_ESM'
      }
      [22.01.2022 20:01.36.293] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [22.01.2022 20:01.36.295] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [22.01.2022 20:01.38.394] [LOG]   Launching application.
      [12298:0122/200144.333810:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
      [12329:0122/200145.375493:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
      [22.01.2022 20:01.58.391] [LOG]   Shutting down server...
      [22.01.2022 20:01.58.398] [LOG]   Stopping module helper: updatenotification
      [22.01.2022 20:01.58.401] [LOG]   Stopping module helper: updatenotification
      [22.01.2022 20:01.58.406] [ERROR] Whoops! There was an uncaught exception...
      [22.01.2022 20:01.58.410] [ERROR] TypeError: Cannot read properties of undefined (reading 'close')
          at App.stop (/home/pi/MagicMirror/js/app.js:257:14)
          at App.<anonymous> (/home/pi/MagicMirror/js/electron.js:139:7)
          at App.emit (node:events:394:28)
          at appMethod (node:electron/js2c/browser_init:69:1830)
          at Object.execute (node:electron/js2c/browser_init:69:5623)
          at MenuItem.click (node:electron/js2c/browser_init:73:1862)
          at Object.a._executeCommand (node:electron/js2c/browser_init:81:2453)
      [22.01.2022 20:01.58.414] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [22.01.2022 20:01.58.417] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      

      Can someone help me fix this?

      posted in Troubleshooting
      E
      Extra
    • RE: MM and Custom Python Script

      @sdetweil Thanks will do. I just got a little confused, thanks for the clarification.

      posted in General Discussion
      E
      Extra
    • RE: MM and Custom Python Script

      @sdetweil So your PythonPrint module will let me run my python script as MM is running, correct?

      And how would I get the print statements to appear like the compliments (same font size, transitions. And if I have 2 sentences that need to be displayed it breaks up the words and fades them in/out in order)?

      So basically, I press a button(which unmutes my mic), say my command, and have the results displayed to MM.

      Here’s a sample of my python script:

      #-------------------------------------------------------------------------------------
                                  #Search Wikipedia (General Info)
          #-------------------------------------------------------------------------------------
          if ('weather' not in command): 
              if ('who is' in command) or ('what is the' in command) or ('what is a' in command) or ("what is" in command):
                  if ('time' not in command):
                      if ('news' not in command):
                          speak('Searching Wikipedia...')
                          command = command.replace("who is","")
                          command = command.replace("what is the","")
                          command = command.replace("what is a","")
                          command = command.replace("what is","")
                          results = wikipedia.summary(command, sentences = 2)
                          #----------------------
                          #Auto typing animation:
                          print("Baxter: ", end="")
                          for i in results:
                              sys.stdout.write(i)
                              sys.stdout.flush()
                              time.sleep(0.05)
                          print("\n")
                          #----------------------
                          speak(results) 
          #-------------------------------------------------------------------------------------
                          #Search Wolfram Alpha (Math/Conversions, Definitions)
          #-------------------------------------------------------------------------------------
          if ('weather' not in command):
              if ('news' not in command):
                  if ('calculate' in command) or ("what's" in command) or ('define' in command):
                      speak('Searching Wolfram Alpha...')
                      command = command.replace("calculate","")
                      command = command.replace("what's","")
                      command = command.replace("define","")
                      # Wolframalpha App Id
                      appId = ''
                      # Wolfram Instance
                      client = wolframalpha.Client(appId)
                      res = client.query(''.join(command))
                      results = next(res.results).text
                      #----------------------
                      #Auto typing animation:
                      print("Baxter: ", end="")
                      for i in results:
                          sys.stdout.write(i)
                          sys.stdout.flush()
                          time.sleep(0.05)
                      print("\n")
                      #----------------------
                      speak(results) 
      
      posted in General Discussion
      E
      Extra
    • MM and Custom Python Script

      Hello,

      I just discovered Magi Mirror and I absolutely LOVE IT! It’s easy to use and it looks awesome!

      So I have a custom python scripts that I would love to run alongside my Magic Mirror.

      My Python script is a virtual voice assistant that can do google searches, conversions, and more. Anyways, I would love to have that running in the back round while MM is running, instead of using 2 separate Rpi’s. Is that possible? If so, how?

      One more thing, my python script has print statements that print to the terminal but I was wondering if they can be rerouted to the compliments scripts that way the results would display on MM then fade out( and the compliments would then show).
      Is that possible as well and if so, how can it be done?

      Thanks in advance?

      posted in General Discussion
      E
      Extra
    • 1
    • 2
    • 2 / 2