Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3937 มุมมอง

Code Preview

Error Preview

converting module from v10 to v13
module install but when i upload csv file its giving me error ..

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Instead of StringIO try with BytesIO .

See: https://www.odoo.com/forum/help-1/question/odoo11-python-3-expects-string-not-bytes-when-writing-to-file-like-objects-129143

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

File "/opt/odoo13/odoo-custom-addons/import_product_image/models/import_image.py", line 47, in import_file

for row in reader:

_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

after change

ผู้เขียน

i update question please review images again ...

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 23
1048
0
มิ.ย. 23
2246
0
ต.ค. 22
2104
0
ต.ค. 22
2211
2
ต.ค. 21
4540