تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3947 أدوات العرض

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 ...

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
نوفمبر 23
1051
0
يونيو 23
2249
0
أكتوبر 22
2121
0
أكتوبر 22
2216
2
أكتوبر 21
4545