Read the statement by Michael Teeuw here.
MMM-Fritz-Box-Callmonitor: Notification formatting
-
@Jan-0 Can you please fork the updated module? I also tried to make it run under Python3 but failed.
I will then install and have a look at the formatting - though I am no expert either I will give my best.
-
@Jan-0 Please publish your fork and I will have a look at the formatting!
-
Thanks @coernel
Here is the fork and the development branch: https://github.com/drtorchwood/MMM-FRITZ-Box-Callmonitor-py3/tree/code_update_2023 -
@Jan-0 I will have a look tomorrow!
-
I tried to install it but the MagicMirror stays blank after that. I noticed that you don’t use a pyhton-3 shebang in your Python file. Could this be the cause? I will try later to add that!
This is my config:
{ module: 'MMM-FRITZ-Box-Callmonitor-py3', position: 'bottom_left', // This can be any of the regions. Best results in left or right regions. header: "Verpasste Anrufe", // This is optional config: { username: "foo", password: "bar", reloadContactsInterval: 24*60, } },
-
@coernel Perhaps, my renaming of the module is the problem. On my computer, the module is stilled named “MMM-FRITZ-Box-Callmonitor”. I only renamed it for the branch.
I will check this in the next days.
Doespython3 fritz-access.py -u '<username>' -p '<password>'
work? -
@Jan-0 if you rename a module, you have to rename the folder and the filename AND EDIT the file and change it’s register clause w the right name.
modulename - folder
modulename.js
edit modulename.js and change 1 line of code -
After changing some lines as suggested by sdetweil the MagicMirror loads again.
@Jan-0 said in MMM-Fritz-Box-Callmonitor: Notification formatting:
python3 fritz-access.py -u ‘’ -p ‘’
The filename is fritz_access.py. So after executing it I got
print json.dumps({"filename": file, "content": content}) ^ SyntaxError: invalid syntax
This was easily solded by changing it to
print (json.dumps({"filename": file, "content": content}))
(Just adding round brackets) - that was a change from Python2 to Python3.However it was followed by the next error
urllib2
does not work in Python 3. According to stackoverflow urllib.error and urllib.request must be used for Python3.Are you sure you uploaded the right code to github? It seems you accidentally uploaded th old python2 code!
-
-
@wishmaster270
I uploaded my changes in the branch code_update_2023 and did not pullit to the master of the fork.
I will have a look at the pull requests tomorrow.