@deepthought said in Fitbit:
When starting Magic Mirror, the Fitbit module displays no info and the cmd prompt states ‘TypeError: PythonShell.run is not a function’ and ‘TypeError: PythonShell is not a constructor’.
Does anyone know how to resolve this issue with python-shell? I’ve tried different versions and installing through different directories without any success. I’ve also tried clean installs of Magic Mirror but that doesn’t help either.
After some faffing with the config to get the MM to load I am also getting this same error message when MM now loads.
From what I can see it is pulling the auth tokens correctly and is also able to run the getData.ph as running this on its own returns my total lack of steps etc. But the figures are not updating on MM, I’m assuming this is because of the above error messages.
I was able to get past PythonShell.run is not a function by altering line 9 in the node_helper.js to be:
let {PythonShell} = require(‘python-shell’)
However doing this then gave other error messages relating to code in other files, kind of making me think that this was the wrong thing to do. I’m assuming I am missing something obvious.
Does anyone have any suggestions?