Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

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

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
ubuntu
4748 Weergaven
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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
No success with installing saas-5 on Ubuntu 12.04
ubuntu
Avatar
Avatar
1
mrt. 15
6381
How to solve Resolution Error
ubuntu
Avatar
Avatar
Avatar
2
mrt. 15
7890
Ubuntu Linux 12.04 64-bit after Installation Internal Server Error Opgelost
ubuntu
Avatar
Avatar
Avatar
Avatar
4
dec. 23
23356
Odoo Log Files won't Open
ubuntu logs
Avatar
Avatar
2
aug. 23
4570
How to add new custom-addons directory to the Odoo server? Opgelost
addons ubuntu
Avatar
Avatar
Avatar
Avatar
Avatar
4
mei 23
46537
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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