Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
ubuntu
4705 Vues
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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
No success with installing saas-5 on Ubuntu 12.04
ubuntu
Avatar
Avatar
1
mars 15
6366
How to solve Resolution Error
ubuntu
Avatar
Avatar
Avatar
2
mars 15
7870
Ubuntu Linux 12.04 64-bit after Installation Internal Server Error Résolu
ubuntu
Avatar
Avatar
Avatar
Avatar
4
déc. 23
23337
Odoo Log Files won't Open
ubuntu logs
Avatar
Avatar
2
août 23
4553
How to add new custom-addons directory to the Odoo server? Résolu
addons ubuntu
Avatar
Avatar
Avatar
Avatar
Avatar
4
mai 23
46400
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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