Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pressing escape to exit a popup makes s-tui crash #50

Closed
nixomose opened this issue Dec 10, 2017 · 6 comments
Closed

pressing escape to exit a popup makes s-tui crash #50

nixomose opened this issue Dec 10, 2017 · 6 comments
Labels

Comments

@nixomose
Copy link

Step 1: Describe your environment

  • System (Intel/AMD/Raspberry Pi etc): intel x86_64___
  • OS version: ubuntu 16.04___
  • s-tui version: 0.6.7.2
  • Installation method(pip/PPA/source code): _pip

Step 2: Describe the problem:

Observed Results:

  • What happened? (Traceback of a crash/Image/description):
    open up the help window, hit escape once or twice, then click help again

Traceback (most recent call last):
File "/usr/local/bin/s-tui", line 9, in
load_entry_point('s-tui==0.6.7.2', 'console_scripts', 's-tui')()
File "/usr/local/lib/python3.5/dist-packages/s_tui/s_tui.py", line 680, in main
graph_controller.main()
File "/usr/local/lib/python3.5/dist-packages/s_tui/s_tui.py", line 544, in main
self.loop.run()
File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 278, in run
self._run()
File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 376, in _run
self.event_loop.run()
File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 682, in run
self._loop()
File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 719, in _loop
self._watch_filesfd
File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 393, in
event_loop, callback, self.get_available_raw_input())
File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 466, in parse_input
codes, wait_for_more)
File "/usr/local/lib/python3.5/dist-packages/urwid/escape.py", line 385, in process_keyqueue
if run[0] == "esc" or run[0].find("meta ") >= 0:
AttributeError: 'tuple' object has no attribute 'find'

Debug Results, output of s-tui -d created in a file _s-tui.log:

* Replace this with debug output *

Step 3: Reproduce the problem:

Steps to reproduce:




* Replace this with relevant code to reproduce the problem *
@amanusk
Copy link
Owner

amanusk commented Dec 10, 2017

Thank you for opening a bug report,
Are you able to reproduce this behaviour?
I have tried reproducing it with ubuntu 16.04 without success:
Pressing esc with the help menu opened and opening it again multiple times.
Are there any additional steps

@nixomose
Copy link
Author

maybe I wasn't clear about the mouse part:

  1. click on the help button with the mouse
  2. hit the esc key twice (the first time doesn't make it go away)
  3. click the help button with the mouse again.
  4. boom.
Traceback (most recent call last):_______________________________________________________________________________________________________________________________________________________│
  File "/usr/local/bin/s-tui", line 9, in <module>                                                Temperature [C]                                                                        │
    load_entry_point('s-tui==0.6.7.2', 'console_scripts', 's-tui')()                                                                                                                     │
  File "/usr/local/lib/python3.5/dist-packages/s_tui/s_tui.py", line 680, in main                                                                                                        │
    graph_controller.main()                                                                                                                                                              │
  File "/usr/local/lib/python3.5/dist-packages/s_tui/s_tui.py", line 544, in main                                                                                                        │
    self.loop.run()    │                                                                                                                                                                 │
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 278, in run                                                                                                     │
    self._run()        │                                                                                                                                                                 │
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 376, in _run                                                                                                    │
    self.event_loop.run()                                                                                                                                                                │
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 682, in run                                                                                                     │
    self._loop()       │ ________________________________________________________________________________________________________________________________________________________________│
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 719, in _loop               Power [W]                                                                           │
    self._watch_files[fd]().0                                                                                                                                                            │
  File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 393, in <lambda>                                                                                              │
    event_loop, callback, self.get_available_raw_input())                                                                                                                                │
  File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 466, in parse_input                                                                                           │
    codes, wait_for_more)                                                                                                                                                                │
  File "/usr/local/lib/python3.5/dist-packages/urwid/escape.py", line 385, in process_keyqueue                                                                                           │
    if run[0] == "esc" or run[0].find("meta ") >= 0:                                                                                                                                     │
AttributeError: 'tuple' object has no attribute 'find'         ```

@amanusk
Copy link
Owner

amanusk commented Dec 10, 2017

Could be terminal related?
What terminal emulator are you using? Could you test this a differnt one and see if it still occurs?

@nixomose
Copy link
Author

well I was doing it in screen when it failed, so I tried it in a gnome terminal (I use xfce) and it was harder to get it to do it, but I just went all spazzy clicking on help and hitting escape, and eventually it failed.
If it is just me, don't worry about it.

@amanusk amanusk added the bug label Dec 11, 2017
amanusk added a commit that referenced this issue Apr 28, 2018
Bars used to alternate in color which might be confusing. Now the are
kept in the original color they were created.

+ Add fix for #50, an attribute error in urwid causes a crash, this will
restart the view when this happens
@amanusk
Copy link
Owner

amanusk commented Apr 29, 2018

@nixomose I have added a fix for this bug in the latest version.
Please try upgrading with pip install s-tui --upgrade and see if the issue persists.
Thanks.

@nixomose
Copy link
Author

nixomose commented May 3, 2018

that seems to have fixed it, thanks.

@nixomose nixomose closed this as completed May 3, 2018
amanusk added a commit that referenced this issue Aug 27, 2018
amanusk added a commit that referenced this issue Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants