Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3928 Lượt xem

Code Preview

Error Preview

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

i update question please review images again ...

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 23
1014
0
thg 6 23
2223
0
thg 10 22
2057
0
thg 10 22
2194
2
thg 10 21
4512