I also did this in that file where you add the ip etc.
Change this line: os.setlocale("ISO-8559-1", "numeric")
to comment it out by putting two dashes in front like this: --os.setlocale("ISO-8559-1", "numeric")
Mine wouldn't work unless I made that change along with all the stuff you did.
Hope it helps.