Read the statement by Michael Teeuw here.
MMM-FRITZ-Box-Callmonitor throws an error after enabling phonebook sync
-
Hi there,
I recently build up a magicmirror2 install on a raspberry Pi Zero W.
The MM is working and now I’m playing around with modules.After installing the MMM-FRITZ-Box-Callmonitor module it shows incoming calls and also call history. But when I activate the phonebook sync it throws me an error on the console:
Received config for MMM-FRITZ-Box-Callmonitor MMM-FRITZ-Box-Callmonitor is waiting for incoming calls. Starting access to FRITZ!Box... Whoops! There was an uncaught exception... TypeError: PythonShell is not a constructor at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:62:10) at Socket.<anonymous> (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11) at emitTwo (events.js:125:13) at Socket.emit (events.js:213:7) at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:513:12 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
The config for the module is:
{ module: "MMM-FRITZ-Box-Callmonitor", position: "bottom_left", // This can be any of the regions. Best results in left or right regions. header: "Letzte Anrufe", // This is optional config: { showContactsStatus: "true", fritzIP: "192.168.178.1", showContactsStatus: "true", maximumCallDistance: "9999999999", username: "username", password: "password", debug: "true", // See 'Configuration options' for more information. } },
Where can I see the debug informations? On the MM screen I only see this:
and the sync circle is running without ending.The issue occures everytime I reload the MM website.
During the install of the module I don’t get errors but I’m not that firm with linux to go deeper in the programming.
Maybe someone can help?
Thanks,
kovu94 -
Although I did not have a problem with syncing, (actually I was not getting any call history) my logs gave a similar error.
TypeError: PythonShell is not a constructor at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:69:9) at Socket.<anonymous> (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11) at emitTwo (events.js:126:13) at Socket.emit (events.js:214:7) at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)
Looking for the error on internet I found some references to the PythonShell dependency that is being used. It seems that PythonShell is now running at version 1.0.7. Where it was running @ version 0.5.0 during development of the module.
I have reverted back to 0.5.0 and things are working like they should!
Go to
cd ~/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules
.
Remove the Python-shell directory and all its content:
rm python-shell -r
.
Now reinstall the old version with:
npm install python-shell@0.5.0
.Restart your MagicMirror and it should work.
Al least it did for me. :smiling_face:
Hein-Jan
-
-
@sandy2503 said in MMM-FRITZ-Box-Callmonitor throws an error after enabling phonebook sync:
ted
I carefully made this corrections you suggested but now got more errors.
Whoops! There was an uncaught exception... SyntaxError: Unexpected token F in JSON at position 2 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:108:18) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Whoops! There was an uncaught exception... TypeError: Cannot read property 'indexOf' of undefined at PythonShell._endCallback (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:233:25) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:148:39) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:121:13) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
git show Joseph Bethge 30.oct.2016