Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Print Error Style '0' not found in stylesheet

By
Javier
on 5/30/13, 7:25 PM 1,386 views

Hi, when i try print a Quotation, i have this error. Any Idea?

Style '0' not found in stylesheet

(<type 'exceptions.keyerror'="">, KeyError("Style '0' not found in stylesheet",), <traceback object="" at="" 0x5fcd5a8="">)

Best Regards

We also have same problem, we have followed all answers mentioned but still not resolved specially in Centos unix, it always show the following message: File "/usr/lib64/python2.6/site-packages/reportlab/lib/styles.py", line 149, in __getitem__ raise KeyError, "Style '%s' not found in stylesheet" % key KeyError: "Style '0' not found in stylesheet"

Soft Magic for Technical Solutions Company LTD.
on 2/27/14, 6:42 AM
1
Wolfgang Taferner
On 6/2/13, 11:56 AM

Hi,

The dependency issue is now fixed in OpenERP Server Revision 4995 again, so it should not be neccesary to apply the workaround, which I suggested beneath!!

The solution is to update the version of reportlab to the newest version (2.7) - if you are on Debian you probably only have reportlab 2.4.4 via apt.

Install pip and download/build via this package manager:

apt-get install pip
apt-get install python-dev (for building reportlab)
apt-get remove reportlab

Update: CentOS (use yum in the commandline...sudo/root probably needed) - not tested but kind of easy guess

yum install pip
yum install python-dev (for building reportlab)
yum remove reportlab

Use PIP for installing Python libraries for your installation and python version

pip install reportlab OR
pip -v install reportlab --upgrade (verbose w/ upgrade flag)

I am pretty sure this will help you :-)

Hi, Thank you for this, how about the CENTOS 6? I have been tested on CENTOS 6 this problem persist, for the unbuntu there is no problem, can you help with?

Y
on 6/2/13, 12:53 PM

I am pretty sure that CentOS has the same problem (old version w/ the embedded package manager)

So, remove the old version and install version 2.7, then the problem should be gone...

TaPo-IT OG, Wolfgang Taferner
on 6/2/13, 1:06 PM

Hi, I have run yum update, for update all, but there still have the problem after update can you help with CENTOS issue?

Y
on 6/2/13, 1:08 PM

I have updated my answer...you need to remove reportlab and not to update/upgrade, b/c they deliver probably an old version. Use PIP instead...

TaPo-IT OG, Wolfgang Taferner
on 6/2/13, 1:15 PM

Thank you can you guide us with CENTOS how to uninstall the pakcage manager and install to new?

Y
on 6/2/13, 1:20 PM

Thank you for your valuable time and much appricate your help.

Y
on 6/2/13, 1:20 PM
0
Y
On 5/31/13, 2:46 PM

Same problem in here, can anyone help?

Are just this release build got the problem?

0
P.V.Anthony
On 6/14/13, 6:05 AM

For CentOS 6 64bit, here are the commands used. Very similar to the answer.

yum install python-pip
yum install python-devel
yum remove python-reportlab

python-pip install reportlab

How this issue can be solved when we use ubuntu OS?

Abhishek H Menon
on 11/4/13, 4:32 AM

Look at answers 1 on this page.

P.V.Anthony
on 11/4/13, 11:28 AM

Yes i got the answer. After updating the reportlab

Abhishek H Menon
on 11/5/13, 3:18 AM
0
Kevin Vitullo
On 5/31/13, 11:40 AM

Hi,

I Have a same problem ... Need Help

Best Regards

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/30/13, 7:25 PM
Seen: 1386 times
Last updated: 3/16/15, 8:10 AM