콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
23473 화면

I am trying a module for electronic invoicing in Mexico. When I try to generate the CFDI (XML file) I get the following error:

File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 28, in <module>
from reportlab.graphics import _renderPM
ImportError: name '_renderPM' cannot be imported

I've tried to fix it by reinstalling development tools and reportlab, but I'm still getting the same error.


I've odoo 12 community edition installed on a Linux Mint 19.2


Thanks for the support

아바타
취소
베스트 답변

If anyone still facing this issue especially for newer versions of python and reportlab just install: rl-renderPM

pip install rl-renderPM
아바타
취소

Had a similar error:
reportlab.graphics.utils.RenderPMError: cannot import desired renderPM backend rlPyCairo
Having pycairo and reportlab was not enough. This solved it:
pip install rlpycairo

베스트 답변

Hi,

Try bellow command:


For Python3.6:

sudo python3.6 -m pip install --upgrade --force-reinstall reportlab


For Python3:

sudo python3 -m pip install --upgrade --force-reinstall reportlab


Regards

Haresh Kansara
 
https://join.skype.com/invite/dl0S6rgZ7GBF  
아바타
취소
베스트 답변

Hello Hugo
​Tried to install python library 

sudo apt-get install python3-renderpm

renderpm







아바타
취소
베스트 답변

Adding my 2cent here.

I encountered this error after upgrading to Odoo 17.

Traceback (most recent call last):

  File "/opt/odoo/prod/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 43, in _getPMBackend

    import rlPyCairo as M

ModuleNotFoundError: No module named 'rlPyCairo'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo/prod/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 46, in _getPMBackend

    import _rl_renderPM as M

ModuleNotFoundError: No module named '_rl_renderPM'

bizarrely, I did not encounter the error in my test-environment.

I tried various commands to install/update pycairo / renderpm, to no avail.

I'm running on Ubuntu 20.4

In the end, I noticed my test-environment was installed with Python 3.11, while in production I have 3.12. I create a new venv for production with Python 3.11. That resolved the issue.



아바타
취소
관련 게시물 답글 화면 활동
3
10월 23
9046
1
9월 23
3425
1
5월 23
2400
2
4월 23
2965
1
3월 23
2348