<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Fitbit throwing an error]]></title><description><![CDATA[<p dir="auto">I followed the procedure - the module is reading client id and secret right, but failts in a following way.</p>
<pre><code>[10:59:56.939] [LOG]    Set credential request recieved.
[10:59:56.945] [LOG]    { client_id: 'XXXXXX',
  client_secret: 'XXXXXXXX' }
[10:59:56.968] [LOG]    Whoops! There was an uncaught exception...
[10:59:56.969] [ERROR]  TypeError: PythonShell.run is not a function
    at Class.setCreds (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:32:15)
    at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:18:9)
    at Socket. (/home/pi/MagicMirror/js/node_helper.js:113:11)
    at Socket.emit (events.js:182:13)
    at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
    at process._tickCallback (internal/process/next_tick.js:61:11)
[10:59:56.974] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[10:59:56.977] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
</code></pre>
<p dir="auto">It shows the icons in UI, but does not show stats. Also results in mirror crashing after a while. What am I missing?</p>
]]></description><link>https://forum.magicmirror.builders/topic/12067/mmm-fitbit-throwing-an-error</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 14:02:42 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/12067.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jan 2020 16:21:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Fitbit throwing an error on Thu, 23 Jan 2020 14:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nakulbende" aria-label="Profile: nakulbende">@<bdi>nakulbende</bdi></a>  there is no ‘error’… just warnings and  dumb warnings (no package.json file, yeh so what!),.</p>
<p dir="auto">sadly it looks like this module is way out of date and not updated…</p>
<p dir="auto">there was another user here creating a new fitbit module</p>
<p dir="auto">see here<br />
<a href="https://forum.magicmirror.builders/topic/12029/what-is-the-procedure-for-reviving-a-dead-module">https://forum.magicmirror.builders/topic/12029/what-is-the-procedure-for-reviving-a-dead-module</a></p>
]]></description><link>https://forum.magicmirror.builders/post/68545</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68545</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 23 Jan 2020 14:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fitbit throwing an error on Thu, 23 Jan 2020 14:40:49 GMT]]></title><description><![CDATA[<p dir="auto">It is still giving me an error:</p>
<pre><code>[09:34:25.018] [LOG]    Whoops! There was an uncaught exception...
[09:34:25.020] [ERROR]  TypeError: PythonShell.run is not a function
    at Class.setCreds (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:32:15)
    at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:18:9)
    at Socket.&lt;anonymous&gt; (/home/pi/MagicMirror/js/node_helper.js:113:11)
    at Socket.emit (events.js:182:13)
    at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
    at process._tickCallback (internal/process/next_tick.js:61:11)
[09:34:25.026] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[09:34:25.029] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
[09:34:25.136] [LOG]    Initial run request recieved.
[09:34:25.139] [LOG]    Running getData.py
[09:34:25.143] [LOG]    Whoops! There was an uncaught exception...
[09:34:25.146] [ERROR]  TypeError: PythonShell is not a constructor
    at Class.getData (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:43:25)
    at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:22:9)
    at Socket.&lt;anonymous&gt; (/home/pi/MagicMirror/js/node_helper.js:113:11)
    at Socket.emit (events.js:182:13)
    at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
    at process._tickCallback (internal/process/next_tick.js:61:11)
[09:34:25.148] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[09:34:25.150] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
</code></pre>
<p dir="auto">This is my output of npm install (usually the log for npm audit fix too):</p>
<pre><code>pi@magicmirror:~/MagicMirror/modules/MMM-fitbit $ sudo npm install python-shell -f
npm WARN using --force I sure hope you know what you are doing.
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
npm WARN modules No description
npm WARN modules No repository field.
npm WARN modules No README data
npm WARN modules No license field.

+ python-shell@1.0.8
updated 1 package and audited 391 packages in 3.359s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
</code></pre>
<p dir="auto">I was able to solve this by invoking <code>npm init</code> and generating a new package.json file. Now, the output to installing pythoin-shell was</p>
<pre><code>pi@magicmirror:~/MagicMirror/modules/MMM-fitbit $ sudo npm install python-shell -f
npm WARN using --force I sure hope you know what you are doing.
npm notice created a lockfile as package-lock.json. You should commit this file.
+ python-shell@1.0.8
added 1 package from 1 contributor and audited 1 package in 1.4s
found 0 vulnerabilities
</code></pre>
<p dir="auto">No cigar, I still get the above error on <code>npm install</code></p>
]]></description><link>https://forum.magicmirror.builders/post/68541</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68541</guid><dc:creator><![CDATA[nakulbende]]></dc:creator><pubDate>Thu, 23 Jan 2020 14:40:49 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fitbit throwing an error on Wed, 22 Jan 2020 16:39:41 GMT]]></title><description><![CDATA[<p dir="auto">I opened issue <a href="https://github.com/SVendittelli/MMM-fitbit/issues/28" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/SVendittelli/MMM-fitbit/issues/28</a><br />
in the module  github to try to get this fixed by the author or someone</p>
]]></description><link>https://forum.magicmirror.builders/post/68515</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68515</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 22 Jan 2020 16:39:41 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fitbit throwing an error on Wed, 22 Jan 2020 16:34:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nakulbende" aria-label="Profile: nakulbende">@<bdi>nakulbende</bdi></a> looks like mmm-fitbit has a faulty setup…</p>
<p dir="auto">the pyhton-shell module dependency wasn’t installed for it…<br />
from the code in node_helper.js</p>
<pre><code>var PythonShell = require('python-shell');
</code></pre>
<p dir="auto">to fix do<br />
change to the MMM-Fitbit folder</p>
<pre><code>npm install python-shell
</code></pre>
<p dir="auto">the author should have provided a package.json to handle this, with instructions for npm install<br />
there was a security fix added in the npm code, if a module (in node_modules) is found, but not referenced by a package.json dependency, that module is removed (in case someone is trying to sneak stuff into the runtime to steal data)</p>
<p dir="auto">this will happen to you again</p>
]]></description><link>https://forum.magicmirror.builders/post/68514</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68514</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 22 Jan 2020 16:34:00 GMT</pubDate></item></channel></rss>