I'm having problems getting this python script working on my Wheezy Debian RPi.
I keep getting the following error message
Code: Select all
SyntaxError: Non-ASCII character '\xc2' in file /home/******/code/ip_mailer.py on line 22, but no encoding declared;
I've copy & pasted the code exaclty as it is on that page, but I keep getting error messages when I try to execute the script - FYI I've not done all the messing about with boot.rc yet. I just wanted to make sure the script works before I do that.
I'm entirely new to Python, but I figured I couldn't go wrong with a copy & paste from a site like this one - obviously I was wrong LOL. Any ideas what the problem is?
The line in question appears to be -
I've tried removing the % ipaddr
form the end of this line & that clears up the problem, but then I get the same error code on line 24. Removing the similar part of line 24 after the second % also gets rid of that error. But then I'm left with a useless script that doesn't pass any useful info to an email