[Python-3000] TypeError: expected bytes, str found
Amaury Forgeot d'Arc
amauryfa at gmail.com
Tue Apr 1 18:04:58 CEST 2008
Vizcayno <vizcaynot at gmail.com> wrote:
> I am doing some testing using Python r30a3:61161 under command prompt
> of WinXp SP2.
> Is this possible to find an explanation about next error? I tried to
> find the error message in the web but no info exists and, can not
> isolate or reproduce it.
> Many, many thanks for your attention.
>
> Traceback (most recent call last):
> File "testconn.py", line 112, in <module>
> main(sys.argv)
> File "testconn.py", line 100, in main
> sap.sapinfo()
> File "C:\os\sapconn\saprfc_py30\saprfc.py", line 142, in sapinfo
> print("Aqui estoy")
> File "C:\python30\lib\io.py", line 1248, in write
> self.buffer.write(b)
> File "C:\python30\lib\io.py", line 852, in write
> if len(self._write_buf) > self.buffer_size:
> TypeError: expected bytes, str found
Did you by any chance redirect stdout or stderr to something?
cStringIO, for example.
--
Amaury Forgeot d'Arc
More information about the Python-3000
mailing list