Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I am trying to import data from a xlsx file, using the Import button, but I get the following error, regardless of what module i use:

Import preview failed due to: Unable to load "xlsx" file: requires Python module "xlrd >= 1.0.0".

I have installed xlrd already, using the following command, on both the virtual environment and normally:

pip3 install xlrd

But the error persists. I'm sure xlrd is installed correctly, because the python interpreter can import it correctly:

(odoo-12.0) wojdob@vbox:~$ python3 -c "import xlrd; print (xlrd.__VERSION__)"
2.0.1

Also the xlrd folder is present in the site-packages odoo folder:

~/odoo-12.0/lib/python3.8/site-packages/xlrd

How do I fix this problem so I can import xlsx files? Do I need to somehow configure my odoo so it can actually see and use the library?

Ảnh đại diện
Huỷ bỏ

see my answer

Câu trả lời hay nhất

Had same problem in version 13.0. Solved it by downgrading the xlrd version to 1.1.0.

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

Hello, in my case, it happened because I tried to import an 'xlsx' file into Odoo 12, where at the time it was not supported yet. So I had to "Save As..." the document into an older 'xls' file instead.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 24
5751
4
thg 6 25
12258
3
thg 9 19
4838
4
thg 11 24
11192
1
thg 11 23
5908