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.

requires python3, tkinter; AND cannot run headless

See original GitHub issue

The server I was attempting to benchmark didn’t have these items, that appear to be required. After installing the additional dependencies, it appears tkinter requires a working x display.

😦 I was so close!

My thoughts: After the .json files are generated, send them to another machine with the additional libraries / dependencies for image generation.


Traceback (most recent call last):
  File "./fio-plot.py", line 320, in <module>
    main()
  File "./fio-plot.py", line 306, in main
    b.chart_iops_latency('read')
  File "./fio-plot.py", line 259, in chart_iops_latency
    c.plot_io_and_latency(mode)
  File "./fio-plot.py", line 26, in plot_io_and_latency
    nrows=2, gridspec_kw={'height_ratios': [7, 1]})
  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 1202, in subplots
    fig = figure(**fig_kw)
  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 535, in figure
    **kwargs)
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager
    return new_figure_manager_given_figure(num, figure)
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure
    window = Tk.Tk()
  File "/usr/lib64/python3.6/tkinter/__init__.py", line 2017, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

Finally: Thank you for creating, publishing, documenting, and blogging about your work. It has been a resource of mine for the past few years.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
louwrentiuscommented, May 9, 2017

Thank you, X should not be required, I will try to reproduce and fix it. Which flavour of Linux do you run?

On 9 May 2017, at 00:21, PatNarciso notifications@github.com wrote:

The server I was attempting to benchmark didn’t have these items, that appear to be required. After installing the additional dependencies, it appears tkinter requires a working x display.

😦 I was so close!

My thoughts: After the .json files are generated, send them to another machine with the additional libraries / dependencies for image generation.

Traceback (most recent call last): File “./fio-plot.py”, line 320, in <module> main() File “./fio-plot.py”, line 306, in main b.chart_iops_latency(‘read’) File “./fio-plot.py”, line 259, in chart_iops_latency c.plot_io_and_latency(mode) File “./fio-plot.py”, line 26, in plot_io_and_latency nrows=2, gridspec_kw={‘height_ratios’: [7, 1]}) File “/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py”, line 1202, in subplots fig = figure(**fig_kw) File “/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py”, line 535, in figure **kwargs) File “/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_tkagg.py”, line 81, in new_figure_manager return new_figure_manager_given_figure(num, figure) File “/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_tkagg.py”, line 89, in new_figure_manager_given_figure window = Tk.Tk() File “/usr/lib64/python3.6/tkinter/init.py”, line 2017, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable Finally: Thank you for creating, publishing, documenting, and blogging about your work. It has been a resource of mine for the past few years.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
louwrentiuscommented, Nov 27, 2019

I have released an almost total rewrite that requires python3. I’ve tested it on a clean Linux box and it seems to work fine, without the issues reported above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tkinter with headless Chrome runs fine on Mac but not on ...
The problem isn't with running chrome in a headless environment, the problem is with running tkinter. Tkinter requires a display, ...
Read more >
Tkinter with headless Chrome runs fine on Mac but not on ...
The problem isn't with running chrome in a headless environment, the problem is with running tkinter. Tkinter requires a display, either a physical...
Read more >
xvfbwrapper - PyPI
It runs in memory and does not require a physical display. Only a network layer is necessary. Xvfb is especially useful for running...
Read more >
Which Python GUI library should you use in 2022?
Tkinter is the defacto GUI framework for Python. It comes bundled with Python on both Windows and macOS. (On Linux, it may require...
Read more >
Ssh x11 forwarding - Cannot load backend 'TkAgg' which ...
Ssh x11 forwarding - Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running.
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