Unicode issue with Python v3.3

Ian Kelly ian.g.kelly at gmail.com
Tue Apr 9 17:34:25 EDT 2013


On Tue, Apr 9, 2013 at 3:10 PM, Νίκος Γκρ33κ <nikos.gr33k at gmail.com> wrote:
> Hello, iam still trying to alter the code form python 2.6 => 3.3
>
> Everyrging its setup except that unicode error that you can see if you go to http://superhost.gr
>
> Can anyone help with this?
> I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue.
>
> I don't know what to try anymore.

It seems to be failing on the line:

host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]

So the obvious question to ask is: what are the contents of
os.environ['REMOTE_ADDR'] when this line is reached?

And why are you still trying to solve these sorts of problems on your
production website?  Do you not have a development or staging
environment?



More information about the Python-list mailing list