-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
P1needed for current cycleneeded for current cyclebugsomething brokensomething brokendocumentationwritten for humanswritten for humans
Description
The official Plotly documentation shows plotly.io.install_chrome()
as a method for installing Chrome for static image export, but this method doesn't actually exist in the plotly.io
module, causing AttributeError
when users try to use it.
Documentation vs Reality
📖 What the docs show:
import plotly.io as pio
pio.install_chrome()
Source: https://plotly.com/python/static-image-export/#chrome
💥 What actually happens:
AttributeError: module 'plotly.io' has no attribute 'install_chrome'
✅ What actually works:
plotly_get_chrome
Steps to Reproduce
- Follow the official static image export documentation
- Try to run
plotly.io.install_chrome()
- Observe the
AttributeError
Expected Behavior
Either:
- The
plotly.io.install_chrome()
method should exist and work as documented, OR - The documentation should be corrected to only show the working
plotly_get_chrome
command
Current Workaround
Users must use the command-line tool instead:
import subprocess
subprocess.run(["plotly_get_chrome", "-y"], check=True)
Environment
- Plotly version: 5.x+ (affects current versions)
- Kaleido>=1.0
- Python: 3.9+
- OS: All platforms
Impact
- User confusion: Official docs lead users to non-working code
- Development friction: Users waste time debugging non-existent methods
- Documentation credibility: Undermines trust in other documented APIs
Suggested Fix
Option 1 (Preferred): Implement the missing method
# Add to plotly/io/__init__.py
def install_chrome():
"""Install Chrome for static image export using Kaleido."""
import subprocess
subprocess.run(["plotly_get_chrome", "-y"], check=True)
Option 2: Update documentation to remove the non-existent method and only show the working command-line approach.
Related Files
- Documentation: https://plotly.com/python/static-image-export/
- API Reference: Missing from plotly.io module
- Working CLI tool:
plotly_get_chrome
command
This issue affects users trying to automate Chrome installation for static image export in CI/CD pipelines and development environments.
Metadata
Metadata
Assignees
Labels
P1needed for current cycleneeded for current cyclebugsomething brokensomething brokendocumentationwritten for humanswritten for humans
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Workaround for plotly/plotly.py#5272
Revert "Workaround for plotly/plotly.py#5272"
LiamConnors commentedon Jul 16, 2025
Thanks for opening this issue @JasperCraeghs. I've removed the reference from the documentation for now. We are going to add
plotly.io.get_chrome
that can be used to install Chrome from Pythonplotly.io.get_chrome()
#5282