Community mailing list archives

community@mail.odoo.com

RE: Import Error Issue on Rel 9 Enterprise editition

by
Bista Solutions US, Ray Carnes
- 11/24/2015 19:00:02

OK, here is what I was able to discover:

 

removing python-xlrd restores the ability to import CSV.

 

sudo apt-get remove python-xlrd

 

But, Excel import won’t work if you do this!   You get:

 

Import preview failed due to: Unable to load "xls" file: requires Python module "xlrd".

 

Also: Excel import also won’t work on runbot

 

Also: xlrd isn’t listed at https://github.com/odoo/odoo/blob/9.0/requirements.txt

 

Also: The script installs xlwt and that IS listed at https://github.com/odoo/odoo/blob/9.0/requirements.txt


So … you can remove the xlrd dependency from my script and import CSV files, or leave the script as is and use Excel.

 

Still looking into this…


Ray.

 

From: Ray Carnes [mailto:ray.carnes@bistasolutions.com]
Sent: Tuesday, November 24, 2015 2:17 PM
To: 'Odoo S.A. Community' <community@mail.odoo.com>
Subject: RE: Import Error Issue on Rel 9 Enterprise editition

 

OK, there is something buggy happening.

 

I exported both attached files using Import-Compatible export, just the CODE field from the default US Chart of Accounts.


The XLS imports fine, while the CSV gives a similar error than what you posted – cutting short the name of the code column in the message:

 

Import preview failed due to: Unsupported format, or corrupt file: Expected BOF record; found '"id","co'.

 

(the column name is CODE, the export came from Odoo, it is correctly encoded as UTF8)

 

I didn’t try the Community Edition, all my work is with Enterprise! J


Ray.

 

From: Aris Corpuz [mailto:aecorpuz@moxylus.com]
Sent: Tuesday, November 24, 2015 1:28 PM
To: Community <community@mail.odoo.com>
Subject: Re: Import Error Issue on Rel 9 Enterprise editition

 

Hi Ray,

 

Have tried that too - importing the csv file with Excel not having been started.

 

I made sure Excel was not running, then imported the csv file from the Accounting -> Adviser -> Chart of Accounts list view. As soon as the file was chosen (to be imported), the error message appears.

 

That was from the Enterprise edition of Rel 9. 

 

Following the same process on the Rel 9 Community version, with Excel running, the same csv file is imported successfully. 

 

Was asked about the xlrd on our instance and I provided this screenshot.

 

ubuntu@ip-172-31-26-218:~$ python

Python 2.7.6 (default, Jun 22 2015, 17:58:13)

[GCC 4.8.2] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import xlrd

>>> print xlrd.__VERSION__

0.9.2

>>> exit

Use exit() or Ctrl-D (i.e. EOF) to exit

>>>

 

ubuntu@ip-172-31-26-218:~$

 

Thanks for your feedback, Ray.

 

Aris

 


 

Aris Corpuz | Implementation Partner 
moxylus philippines
mobile +63 917.693.8520
aecorpuz@moxylus.com | moxylus.com

 

On Tue, Nov 24, 2015 at 10:47 AM, Ray Carnes <ray.carnes@bistasolutions.com> wrote:

I have seen this error when the CSV file is open in an Editor that locks the file (such as Excel).

 

Be sure to close the file if it is open in other programs. 

 

You can also try Excel import/export– I’ve had that work flawlessly so far.


Ray.

 

From: Aris Corpuz [mailto:aecorpuz@moxylus.com]
Sent: Tuesday, November 24, 2015 10:03 AM
To: Community <community@mail.odoo.com>
Subject: Import Error Issue on Rel 9 Enterprise editition

 

Hi Team, 

 

We are facing an issue when trying to import data into Odoo Enterprise v.9. I used the attached install script to install Odoo. 

 

When attempting to import .csv files we get the following error: import preview failed due to: unsupported format, or corrupt file: Expected BOF record; found "id,name\r". For CSV files, the issue could be an incorrect encoding"

 

We get this error even when exporting an import compatible file out of Odoo and immediately attempting to import it without editing it. 

 

Has anyone experienced this issue before or know of a solution to fix it? We have already tried the different encoding options in the menu, and not having the file open in excel while importing. 

 

Your help would be very much appreciated. 


Thank you, 

 

 

Aris Corpuz | Implementation Partner 
moxylus philippines
mobile +63 917.693.8520
aecorpuz@moxylus.com | moxylus.com

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe