UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

Νίκος Gr33k nikos at superhost.gr
Fri Jul 5 12:26:55 CEST 2013


Στις 5/7/2013 12:25 μμ, ο/η Νίκος Gr33k έγραψε:
>
> try:
>      remadd = os.environ('REMOTE_ADDR')
>      tuple3 = socket.gethostbyaddr(remadd)
>      host = tuple3[0]
> except Exception as e:
>      host = repr(e)

> which yields: TypeError("'_Environ' object is not callable",)

Any thoufgs as to why os.environ('REMOTE_ADDR') gives the above error?

I noticed that if i remove my domain from cloudflare the gethostbyaddr 
as it uses too months now.
-- 
What is now proved was at first only imagined!



More information about the Python-list mailing list