Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

plotly.io.to_image not working within odoo 14 on Ubuntu 20.04 server

Subscriure's

Get notified when there's activity on this post

This question has been flagged
ubuntu
4619 Vistes
Avatar
yan

My config:

Server Ubuntu 20.04
Odoo 14 community
Set up in virtual environment
Plotly installed installed on server

I am running a method in odoo that generate plot and create static image used to incorporate in a qweb report.

My code line to generate the static image is as follow.


import pandas as pd
import plotly
import plotly.io as pio
import plotly.express as px

df = pd.DataFrame(dict(
x=[1, 3, 2, 4],
y=[1, 2, 3, 4]
))
fig = px.line(df, x="x", y="y", title="Unsorted Input")
test = pio.to_image(fig, format='png')
print('img generated')



On the server, when I run the code in a .py file on the virtual environment, the static image is generated properly.

When I run the same code  inside an odoo function, the image is not generated.
After 30 seconds, odoo gives me an error message without content.


Below are the process details on Kaleido:


WORKING

WHEN CALLING THE TEST.PY FILE DIRECTLY IN THE VIRTUAL ENVIRONMENT USING:

Python3 tesy.py


Last login: Sat Feb 26 15:23:48 2022 from 50.93.107.87

rd@odoo-new:~$ watch 'ps aux | grep kaleido'


Every 2.0s: ps aux | grep kaleido                                                                                                                                                                                                                                                                                                                                   odoo-new: Sat Feb 26 16:18:34 2022


ylessard   76915  0.2  0.0   9400  4612 pts/1    S+   16:17   0:00 watch ps aux | grep kaleido

ylessard   77387  0.0  0.0   8616  3088 pts/0    S+   16:18   0:00 /bin/bash /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/kaleido plotly --plotlyjs='/usr/local/lib/python3.8/dist-packages/plotly/package_data/plotly.min.js' --disable-gpu --allow-file-access-from-files --disable-breakpad --disable-dev-shm-usage --no-sandbox

ylessard   77391  0.0  0.0 293376 63400 pts/0    Rl+  16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --plotlyjs='/usr/local/lib/python3.8/dist-packages/plotly/package_data/plotly.min.js' --disable-gpu --allow-file-access-from-files --disable-breakpad --disable-dev-shm-usage --no-sandbox plotly

ylessard   77393  0.0  0.0 162960 27768 pts/0    S+   16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=zygote --no-zygote-sandbox --no-sandbox --headless --headless

ylessard   77394  0.0  0.0 162960 27608 pts/0    S+   16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=zygote --no-sandbox --headless --headless

ylessard   77406  0.0  0.0 213592 46472 pts/0    Sl+  16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=gpu-process --field-trial-handle=6944511918208838858,13017558829691272471,131072 --no-sandbox --disable-dev-shm-usage --disable-breakpad --headless --ozone-platform=headless --headless --gpu-preferences=QAAAAAAAAAAgAAAwAAAAAAAAAAAAAAAA

ylessard   77407  0.0  0.0 228652 33560 pts/0    Sl+  16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=6944511918208838858,13017558829691272471,131072 --lang=en-US@posix --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-gl=swiftshader-we

ylessard   77408  0.0  0.1 4473284 70416 pts/0   Sl+  16:18   0:00 /home/ylessard/.local/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=renderer --no-sandbox --disable-dev-shm-usage --disable-breakpad --allow-pre-commit-input --ozone-platform=headless --field-trial-handle=6944511918208838858,13017558829691272471,131072 --disable-databases --disable-gpu-compositing --la

ylessard   77435  0.0  0.0   9400  2528 pts/1    S+   16:18   0:00 watch ps aux | grep kaleido

ylessard   77436  0.0  0.0   2608   612 pts/1    S+   16:18   0:00 sh -c ps aux | grep kaleido

ylessard   77438  0.0  0.0   8160  2596 pts/1    S+   16:18   0:00 grep kaleido



NOT WORKING

When I call the function inside Odoo, the process stalls on the following line:

test = pio.to_image(fig, format='png', engine='kaleido')



Last login: Sat Feb 26 15:23:48 2022 from 50.93.107.87

ylessard@odoo-new:~$ watch 'ps aux | grep kaleido'



Every 2.0s: ps aux | grep kaleido                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           odoo-new: Sat Feb 26 16:37:25 2022


ylessard   76915  0.0  0.0  10148  5268 pts/1    S+   16:17   0:00 watch ps aux | grep kaleido

ylessard   83086  0.0  0.0   8616  3076 pts/3    S+   16:35   0:00 /bin/bash /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/kaleido plotly --plotlyjs='/opt/odoo14/odoo-venv/lib/python3.8/site-packages/plotly/package_data/plotly.min.js' --disable-gpu --allow-file-access-from-files --disable-breakpad --disable-dev-shm-usage --no-sandbox

ylessard   83090  0.1  0.0 270756 49568 pts/3    Sl+  16:35   0:00 /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --plotlyjs='/opt/odoo14/odoo-venv/lib/python3.8/site-packages/plotly/package_data/plotly.min.js' --disable-gpu --allow-file-access-from-files --disable-breakpad --disable-dev-shm-usage --no-sandbox plotly

ylessard   83100  0.0  0.0 162960 27344 pts/3    S+   16:35   0:00 /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=zygote --no-zygote-sandbox --no-sandbox --headless --headless

ylessard   83101  0.0  0.0 162960 27460 pts/3    S+   16:35   0:00 /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=zygote --no-sandbox --headless --headless

ylessard   83113  0.0  0.0 213592 46060 pts/3    Sl+  16:35   0:00 /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=gpu-process --field-trial-handle=7367901302065659043,12836565871931846414,131072 --no-sandbox --disable-dev-shm-usage --disable-breakpad --headless --ozone-platform=headless --headless --gpu-preferences=QAAAAAAAAAAgAAAwAAAAAAAAAAAAAAAAAABgAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAA --use-gl=swiftshader-webgl --override-use-software-gl-for-tests --shared-files

ylessard   83114  0.0  0.0 220456 34192 pts/3    Sl+  16:35   0:00 /opt/odoo14/odoo-venv/lib/python3.8/site-packages/kaleido/executable/bin/kaleido --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=7367901302065659043,12836565871931846414,131072 --lang=en-US@posix --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-gl=swiftshader-webgl --headless --shared-files

ylessard   83846  0.0  0.0  10148  3184 pts/1    S+   16:37   0:00 watch ps aux | grep kaleido

ylessard   83847  0.0  0.0   2608   608 pts/1    S+   16:37   0:00 sh -c ps aux | grep kaleido

ylessard   83849  0.0  0.0   8160  2564 pts/1    S+   16:37   0:00 grep kaleido


0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
No success with installing saas-5 on Ubuntu 12.04
ubuntu
Avatar
Avatar
1
de març 15
6301
How to solve Resolution Error
ubuntu
Avatar
Avatar
Avatar
2
de març 15
7815
Ubuntu Linux 12.04 64-bit after Installation Internal Server Error Solved
ubuntu
Avatar
Avatar
Avatar
Avatar
4
de des. 23
23272
Odoo Log Files won't Open
ubuntu logs
Avatar
Avatar
2
d’ag. 23
4485
How to add new custom-addons directory to the Odoo server? Solved
addons ubuntu
Avatar
Avatar
Avatar
Avatar
Avatar
4
de maig 23
46089
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now