Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
ubuntu
4746 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
No success with installing saas-5 on Ubuntu 12.04
ubuntu
Imagine profil
Imagine profil
1
mar. 15
6381
How to solve Resolution Error
ubuntu
Imagine profil
Imagine profil
Imagine profil
2
mar. 15
7890
Ubuntu Linux 12.04 64-bit after Installation Internal Server Error Rezolvat
ubuntu
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
dec. 23
23356
Odoo Log Files won't Open
ubuntu logs
Imagine profil
Imagine profil
2
aug. 23
4570
How to add new custom-addons directory to the Odoo server? Rezolvat
addons ubuntu
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
mai 23
46537
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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