question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chrome/chromium renderer not detected correctly on Ubuntu (name is chromium-browser)

See original GitHub issue

On my Ubuntu machine I cannot configure a chrome renderer (my default browser is firefox). The reason is that Chromium is registered with the name chromium-browser as shown below, so that webbrowser.get throws an error when called with chrome.

>>> import plotly.io as pio                                                                                                      
>>> pio.renderers.default = 'chromium'                                                                                           
>>> import plotly.graph_objects as go                                                                                            
>>> go.Figure(go.Scatter(x=[1], y=[0])).show()                                                                                   
Traceback (most recent call last):
  File "<ipython-input-5-d0da89a1679b>", line 1, in <module>
    go.Figure(go.Scatter(x=[1], y=[0])).show()
  File "/home/emma/code/plotly.py/packages/python/plotly/plotly/basedatatypes.py", line 2794, in show
    return pio.show(self, *args, **kwargs)
  File "/home/emma/code/plotly.py/packages/python/plotly/plotly/io/_renderers.py", line 391, in show
    renderers._perform_external_rendering(fig_dict, renderers_string=renderer, **kwargs)
  File "/home/emma/code/plotly.py/packages/python/plotly/plotly/io/_renderers.py", line 340, in _perform_external_rendering
    renderer.render(fig_dict)
  File "/home/emma/code/plotly.py/packages/python/plotly/plotly/io/_base_renderers.py", line 736, in render
    open_html_in_browser(html, self.using, self.new, self.autoraise)
  File "/home/emma/code/plotly.py/packages/python/plotly/plotly/io/_base_renderers.py", line 681, in open_html_in_browser
    webbrowser.get(using).open(
  File "/usr/lib/python3.7/webbrowser.py", line 65, in get
    raise Error("could not locate runnable browser")
Error: could not locate runnable browser

>>> import webbrowser                                                                                                            
>>> print(webbrowser._browsers)                                                                                                  
{'xdg-open': [None, <webbrowser.BackgroundBrowser object at 0x7fe81203fef0>], 'gvfs-open': [None, <webbrowser.BackgroundBrowser object at 0x7fe81203fbe0>], 'x-www-browser': [None, <webbrowser.BackgroundBrowser object at 0x7fe81203f7b8>], 'firefox': [None, <webbrowser.Mozilla object at 0x7fe81203ff98>], 'chromium-browser': [None, <webbrowser.Chrome object at 0x7fe81203f860>]}

We could either add another renderer name chromium-browser, or query matching strings in webbrowser._browser.keys(). The second solution is probably cleaner and could also make it possible to remove either ‘chrome’ or ‘chromium’ if we want. Thoughts @jonmmease @nicolaskruchten ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Jul 21, 2021

Thanks @c-chaitanya 👏

0reactions
nicolaskruchtencommented, Jul 21, 2021

Closed in #3278 and improved in #3310

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Enable WebGL In Chrome On Ubuntu?
Step 3: Press Ctrl + f and type ” Rendering list “, “Override software rendering list” should come up, Now click on Enable...
Read more >
WebGL no longer works on Ubuntu 12.04 as of Chrome 36
Since update to chromium 36, webgl sites no longer work on my ubuntu 12.04 although it worked well on chromium 35 and older....
Read more >
Chromium v79 graphics rendering freezes unpredictably ...
I'm using Chromium 79.0.3945.79 Built on Ubuntu 18.04. My application is running in the window of Chromium. Some seconds (unpredictable: could ...
Read more >
Ubuntu Server Documentation
deploy an OpenStack cloud, a Kubernetes cluster or a 50,000-node render farm, ... Or in case autodetect of type iso9660 is not supported...
Read more >
killall chromium-browser: no process found
Focus on achieving your goal, not on fixing the specific tool. If you're trying to kill Chromium's tab processes but not the main...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found