Skip to content

Bug Report: plotly.io.install_chrome() documented but doesn't exist #5272

Open
@JasperCraeghs

Description

@JasperCraeghs

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

  1. Follow the official static image export documentation
  2. Try to run plotly.io.install_chrome()
  3. 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


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 cyclebugsomething brokendocumentationwritten for humans

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions