Read the statement by Michael Teeuw here.
MMM-Fitbit2 PythonShell is not a constructor
-
Hi - I have just committed this fix: https://github.com/m-roberts/MMM-Fitbit2/commit/e958665dcf63900d38f5405961a1a176d5ba2fcf
-
@vizulize That’s great, thank you :)
-
@Tippon
Hello - just wanted to inquire about this problem as I’m encountering the same thing but even with the mentioned change to the require statement it is continuing to occur.


Did you need to make any other changes or corrections to any of the files?
Thank you! -
@frosty_snow can us do , from the module folder
grep version node_modules/python_shell/package.json -
@sdetweil
Looks like I’m on 3.0.0

-
@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.
-
var NodeHelper = require("node_helper"); const PythonShell = require("python-shell");this is working for me
-
I have updated the module: https://github.com/m-roberts/MMM-Fitbit2/commit/27706ea0a9ab13b8d12a020f7234adf361d108ae
-
@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 -
@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!
-
@vizulize yeh, i don’t know whay there is a python_shell lib… as exec and spawn are so easy…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login