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

MRAB python at mrabarnett.plus.com
Thu Jul 4 09:34:42 EDT 2013


On 04/07/2013 13:52, Νίκος wrote:
> Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε:
>> Also, try printing out ascii(os.environ['REMOTE_ADDR']).
>
> '108.162.229.97' is the result of:
>
> print( ascii(os.environ['REMOTE_ADDR']) )
>
> Seems perfectly valid. and also have a PTR record, so that leaved us
> clueless about the internal server error.
>
For me, socket.gethostbyaddr('108.162.229.97') raises socket.herror,
which is also a subclass of OSError from Python 3.3 onwards.




More information about the Python-list mailing list