Unicode issue with Python v3.3
nagia.retsina at gmail.com
nagia.retsina at gmail.com
Wed Apr 10 03:23:46 EDT 2013
Τη Τετάρτη, 10 Απριλίου 2013 7:25:21 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
> What does os.environ['REMOTE_ADDR'] give? Until you answer that question,
> you won't make any progress.
I insists stevv.
Look at what 'python3 metrites.py' gives me
<!-- The above is a description of an error in a Python program, formatted
for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:
Traceback (most recent call last):
File "metrites.py", line 34, in <module>
userinfo = os.environ['HTTP_USER_AGENT']
File "/root/.local/lib/python2.7/lib/python3.3/os.py", line 669, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: b'HTTP_USER_AGENT'
-->
More information about the Python-list
mailing list