Trying to install version 0.1.0.post1 but not available on Azure App Service

Aperta
#234 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia con le versioni di requirements.txt e la chiamata di plotting_function a fig.to_image, quindi riproduci gli errori di installazione e di runtime segnalati su Azure App Service con Python 3.12.6. Confronta i pacchetti Kaleido disponibili e l’ambiente di distribuzione, e considera concluso il lavoro quando il rendering di immagini statiche viene eseguito in modo affidabile nell’app distribuita con una configurazione supportata documentata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

I am using kaleido==0.1.0.post1 (which works on local) in my python plotly dash web app and deploying this on Azure App Service with the configuration of the app service as:

python: 3.12.6
pip: 24.2

And I am getting this error when deploying on Azure, which seems like it can't find this version:

ERROR: No matching distribution found for kaleido==0.1.0.post1
ERROR: Could not find a version that satisfies the requirement kaleido==0.1.0.post1 (from versions: 0.0.1rc3, 0.0.1rc4, 0.0.1rc5, 0.0.1rc6, 0.0.1rc8, 0.0.1rc9, 0.0.1, 0.0.2, 0.0.3, 0.0.3.post1, 0.1.0a2, 0.1.0a3, 0.1.0, 0.2.0rc1, 0.2.0, 0.2.1, 0.4.0rc1, 0.4.0rc2, 0.4.0rc3, 0.4.0rc4, 0.4.0rc5, 1.0.0rc0)

Out of all these version I have tried 0.2.0, 0.2.1 and both of these are leading to hang state. I have also tried 0.1.0 and this gives me an error of:

ValueError:
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
    C:\Code\python.pptx.tester\.venv\Lib\site-packages\kaleido\executable\kaleido

And as I have opted to use version 1.0.0rc0 in the meantime, I am getting this when using the deployed web app:

Kaleido now requires that chrome/chromium is installed separately. Kaleido will try to detect it automatically, but the environmental error "BROWSER_PATH" can also be set.

What can I do to fix this issue (above)?

Is there any fix that I can do to deploy my app and use kaleido for static image rendering in the meantime until Kaleido2 is out? This would be very helpful, thanks!

My requirements.txt:

dash==2.17.0
numpy==1.26.4
pandas==2.1.4
dash-mantine-components==0.14.4
dash-ag-grid==31.2.0
python-dotenv==1.0.1
dash-iconify==0.1.2
dash-bootstrap-components==1.6.0
pyspark==3.5.1
pytz==2024.1
scipy==1.14.0
azure-monitor-opentelemetry==1.6.4
opentelemetry-api==1.28.1
opentelemetry-sdk==1.28.1
msal==1.30.0
python-pptx==1.0.2
# kaleido==0.1.0.post1
kaleido==1.0.0rc0

Lastly, code snippet:

import plotly.graph_objects as go
import pandas as pd
from base64 import b64encode
import plotly

def plotting_function():
    fig = go.Figure()

    # Some scatter plotting etc.

    if save:
        img_bytes = fig.to_image(format="jpeg")
        encoding = b64encode(img_bytes).decode()
        img_b64 = "data:image/jpeg;base64," + encoding
        return img_b64
    else:
        return fig
Lingua principale
Python
Stelle
504
Fork
65
Merge medio
6g 9h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di plotly/kaleido

Tutte le issue di plotly/kaleido

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.