• 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-Fitbit2 PythonShell is not a constructor

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 6 Posters 3.5k Views 6 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.
  • F Offline
    frosty_snow @sdetweil
    last edited by May 9, 2021, 7:19 PM

    @sdetweil
    Looks like I’m on 3.0.0
    cbdc27ce-78ed-4ec4-93bf-d735e2c8e10c-image.png

    1 Reply Last reply Reply Quote 0
    • D Offline
      dmolony
      last edited by May 13, 2021, 2:58 AM

      @frosty_snow Not sure if helpful but I’m using python-shell 0.5.0 and removing the brackets around PythonShell fixed the same error for me.

      1 Reply Last reply Reply Quote 0
      • S Offline
        Stoffbeuteluwe Project Sponsor
        last edited by May 14, 2021, 6:11 AM

        var NodeHelper = require("node_helper");
        const PythonShell = require("python-shell");
        

        this is working for me

        1 Reply Last reply Reply Quote 0
        • V Offline
          Vizulize Module Developer
          last edited by May 16, 2021, 2:25 PM

          I have updated the module: https://github.com/m-roberts/MMM-Fitbit2/commit/27706ea0a9ab13b8d12a020f7234adf361d108ae

          S 1 Reply Last reply May 16, 2021, 2:29 PM Reply Quote 0
          • S Online
            sdetweil @Vizulize
            last edited by sdetweil May 16, 2021, 2:36 PM May 16, 2021, 2:29 PM

            @vizulize i think it depends on what version of python-shell you are running…

            https://github.com/extrabacon/python-shell/issues/154

            your package.json says

            "python-shell": "^0.5.0"
            

            which means 0.5.0 OR ABOVE (technically ‘at minimum’)

            if u want ONLY 0.5.0, take the ^ off the front…
            else sometimes u will get 1.x

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            V 1 Reply Last reply May 16, 2021, 2:33 PM Reply Quote 0
            • V Offline
              Vizulize Module Developer @sdetweil
              last edited by May 16, 2021, 2:33 PM

              @sdetweil It is defined as 0.5.0 in the dependencies.

              To be honest, the Python should be rewritten in JS anyway. Perhaps I will get around to doing that in the near future :thinking_face:

              Then this issue goes away!

              S 1 Reply Last reply May 16, 2021, 2:35 PM Reply Quote 0
              • S Online
                sdetweil @Vizulize
                last edited by May 16, 2021, 2:35 PM

                @vizulize yeh, i don’t know whay there is a python_shell lib… as exec and spawn are so easy…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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