Hi,
I have an scenario where I'm using a wizard which expects a CSV file and
processes it.
On python2 everything is working well, but in python3 I get the
following error:
https://travis-ci.org/trytonspain/trytond-import_csv/jobs/162620003
This is because proteus does only accept bytes or bytearrays for Binary
fields, but in python (both 2 and 3) read returns and str. See:
» python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> isinstance(open('default.csv').read(), str)
True
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> isinstance(open('default.csv').read(), str)
True
Am I doing something wrong? Or it's a proteus bug and it should accept
also string values for text files?
Thanks in advance,
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/ee0697d5-7668-3af2-e972-bfe89e258670%40koolpi.com.