App works locally, does not deploy due to errors

Hello!
Link to not working app: https://studydemo.streamlit.app/
Link to github repo: GitHub - TfedUD/study_demo: An app to display results from a study
streamlit: 1.35.0
python: 3.12.3

I’m currently working on an app that locally works fine but it wont deploy due to the following error

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
    exec(code, module.__dict__)
File "/mount/src/study_demo/app.py", line 11, in <module>
    from ladybug_vtk.visualization_set import VisualizationSet as VTKVisualizationSet
File "/home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/__init__.py", line 4, in <module>
    import ladybug_vtk._extend_ladybug_geometry
File "/home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/_extend_ladybug_geometry.py", line 7, in <module>
    from .from_geometry import from_line2d, from_point2d, from_point3d, from_line3d, \
File "/home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/from_geometry.py", line 4, in <module>
    import vtk
File "/home/adminuser/venv/lib/python3.11/site-packages/vtk.py", line 5, in <module>
    from vtkmodules.vtkWebCore import *

Full message from app manager:

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:600 in _run_script                                      

                                                                                

  /mount/src/study_demo/app.py:11 in <module>                                   

                                                                                

      8 import pandas as pd                                                     

      9 import uuid                                                             

     10 from honeybee_display.model import model_to_vis_set                     

  ❱  11 from ladybug_vtk.visualization_set import VisualizationSet as VTKVisua  

     12 from pollination_streamlit_viewer import viewer                         

     13 from pathlib import Path                                                

     14                                                                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/__init__.py:4   

  in <module>                                                                   

                                                                                

    1 """ladybug-vtk library."""                                                

    2                                                                           

    3 # load all the functions that extends ladybug core library                

  ❱ 4 import ladybug_vtk._extend_ladybug_geometry                               

    5 import ladybug_vtk._extend_ladybug_display                                

    6 import ladybug_vtk._extend_sunpath                                        

    7 import ladybug_vtk._extend_hourly_plot                                    

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/_extend_ladybu  

  g_geometry.py:7 in <module>                                                   

                                                                                

     4 │   Polygon2D, Mesh2D                                                    

     5 from ladybug_geometry.geometry3d import Point3D, LineSegment3D, Polylin  

     6 │   Mesh3D, Face3D, Polyface3D, Cone, Sphere, Cylinder                   

  ❱  7 from .from_geometry import from_line2d, from_point2d, from_point3d, fro  

     8 │   from_polyline3d, from_arc3d, from_mesh3d, from_mesh2d, from_face3d,  

     9 │   from_polyface3d, from_cone, from_sphere, from_cylinder, from_polyli  

    10 │   from_polygon2d                                                       

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/from_geometry.  

  py:4 in <module>                                                              

                                                                                

      1 """Functions to translate ladybug geometry objects into VTK polydata o  

      2                                                                         

      3                                                                         

  ❱   4 import vtk                                                              

      5 import math                                                             

      6 from typing import List, Union                                          

      7 from ladybug_geometry.geometry2d import Point2D, LineSegment2D, Polyli  

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/vtk.py:5 in <module>        

                                                                                

      2                                                                         

      3 # this module has the same contents as vtkmodules.all                   

      4 from vtkmodules.vtkCommonCore import *                                  

  ❱   5 from vtkmodules.vtkWebCore import *                                     

      6 from vtkmodules.vtkCommonMath import *                                  

      7 from vtkmodules.vtkCommonTransforms import *                            

      8 from vtkmodules.vtkCommonDataModel import *                             

────────────────────────────────────────────────────────────────────────────────

ImportError: libGL.so.1: cannot open shared object file: No such file or 

directory

2024-06-02 14:40:56.227 503 GET /script-health-check (10.12.172.196) 185.78ms```
Thanks in advanced for any help and guidance 
-trevor

Hi @trevor_fedyna . Could you share the full error screenshot for better understanding?

Hello @Guna_Sekhar_Venkata! I hope you are well, I’ve edited into the post the full message from the app manager.

Try this:

packages.txt

libgl1
libglib2.0-0

Hi @Franky1 thankyou for your time, I created a packages.txt and added the aforementioned, unfortunately I am still getting errors when launching the app

────────────────────────────────────────────────────────────────────────────────

ImportError: libXrender.so.1: cannot open shared object file: No such file or 

directory

2024-06-02 16:10:07.805 503 GET /script-health-check (10.12.172.224) 235.52ms

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:600 in _run_script                                      

                                                                                

  /mount/src/study_demo/app.py:11 in <module>                                   

                                                                                

      8 import pandas as pd                                                     

      9 import uuid                                                             

     10 from honeybee_display.model import model_to_vis_set                     

  ❱  11 from ladybug_vtk.visualization_set import VisualizationSet as VTKVisua  

     12 from pollination_streamlit_viewer import viewer                         

     13 from pathlib import Path                                                

     14                                                                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/__init__.py:4   

  in <module>                                                                   

                                                                                

    1 """ladybug-vtk library."""                                                

    2                                                                           

    3 # load all the functions that extends ladybug core library                

  ❱ 4 import ladybug_vtk._extend_ladybug_geometry                               

    5 import ladybug_vtk._extend_ladybug_display                                

    6 import ladybug_vtk._extend_sunpath                                        

    7 import ladybug_vtk._extend_hourly_plot                                    

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/_extend_ladybu  

  g_geometry.py:7 in <module>                                                   

                                                                                

     4 │   Polygon2D, Mesh2D                                                    

     5 from ladybug_geometry.geometry3d import Point3D, LineSegment3D, Polylin  

     6 │   Mesh3D, Face3D, Polyface3D, Cone, Sphere, Cylinder                   

  ❱  7 from .from_geometry import from_line2d, from_point2d, from_point3d, fro  

     8 │   from_polyline3d, from_arc3d, from_mesh3d, from_mesh2d, from_face3d,  

     9 │   from_polyface3d, from_cone, from_sphere, from_cylinder, from_polyli  

    10 │   from_polygon2d                                                       

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/ladybug_vtk/from_geometry.  

  py:4 in <module>                                                              

                                                                                

      1 """Functions to translate ladybug geometry objects into VTK polydata o  

      2                                                                         

      3                                                                         

  ❱   4 import vtk                                                              

      5 import math                                                             

      6 from typing import List, Union                                          

      7 from ladybug_geometry.geometry2d import Point2D, LineSegment2D, Polyli  

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/vtk.py:5 in <module>        

                                                                                

      2                                                                         

      3 # this module has the same contents as vtkmodules.all                   

      4 from vtkmodules.vtkCommonCore import *                                  

  ❱   5 from vtkmodules.vtkWebCore import *                                     

      6 from vtkmodules.vtkCommonMath import *                                  

      7 from vtkmodules.vtkCommonTransforms import *                            

      8 from vtkmodules.vtkCommonDataModel import *
  • I only need the error message
  • There seems to be more binary dependencies, also add libxrender1 to packages.txt and try again

That did the trick! thank you a bunch

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.