Open wunderbear opened 5 years ago
This solution didn't solve the problem for me. For me this solution was working: https://github.com/extrabacon/python-shell/issues/154
Line 10 in node_helper.js should be "const {PythonShell} = require('python-shell');"
Andre.
Thank's for your changes, but unfortunately, there is still a bug inside. I installed my MagicMirror again and copied my old config to the new one. So the config can't be the reason for the bug. Do you have any suggestions to fix this problem?
Error Code:
MMM-FRITZ-Box-Callmonitor is waiting for incoming calls. Whoops! There was an uncaught exception... SyntaxError: Unexpected token T in JSON at position 0 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 Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) at Socket.Readable.push (_stream_readable.js:219:10) at Pipe.onread (net.js:636:20)
@Oetzmann do you found a solution for your probelm?
Fixed #32 by applying and testing solution found by @PieBa. Thanks for this!
Root cause seems a breaking change in PythonShell API. After this fix the calls get correctly displayed again, the error log 'TypeError: PythonShell is not a constructor' disappears.