TelegramTUI
TelegramTUI copied to clipboard
App crashes when window is resized
Steps to reproduce:
- Open terminal in windowed mode, half screen for example
- Now resize it to full-screen
- Open another chat
Result: The app crashes with the following message:
/usr/lib/python3.6/site-packages/telethon/telegram_client.py:1092: UserWarning: get_messag e_history is deprecated, use get_messages instead
'get_message_history is deprecated, use get_messages instead'
Traceback (most recent call last):
File "/opt/git/TelegramTUI/src/npyscreen/eveventhandler.py", line 47, in handle_event
handler(event)
File "/opt/git/TelegramTUI/src/ui.py", line 71, in event_chat_select
self.messageBoxObj.update_messages(current_user)
File "/opt/git/TelegramTUI/src/messageBox.py", line 50, in update_messages
self.display()
File "/opt/git/TelegramTUI/src/npyscreen/wgwidget.py", line 429, in display
self.update()
File "/opt/git/TelegramTUI/src/npyscreen/wgboxwidget.py", line 155, in update
w.update(clear=clear)
File "/opt/git/TelegramTUI/src/npyscreen/wgmultiline.py", line 271, in update
if (self._my_widgets[self.cursor_line - self.start_display_at].task in (MORE_LABEL, "PRINTLINELASTOFSCREEN")):
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./telegramTUI", line 5, in <module>
TelegeramTUI.run()
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplication.py", line 30, in run
return npyssafewrapper.wrapper(self.__remove_argument_call_main)
File "/opt/git/TelegramTUI/src/npyscreen/npyssafewrapper.py", line 41, in wrapper
wrapper_no_fork(call_function)
File "/opt/git/TelegramTUI/src/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
return_code = call_function(_SCREEN)
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
return self.main()
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplicationManaged.py", line 172, in main
self._THISFORM.edit()
File "/opt/git/TelegramTUI/src/npyscreen/fm_form_edit_loop.py", line 47, in edit
self.edit_loop()
File "/opt/git/TelegramTUI/src/npyscreen/fm_form_edit_loop.py", line 38, in edit_loop
self._widgets__[self.editw].edit()
File "/opt/git/TelegramTUI/src/npyscreen/wgboxwidget.py", line 164, in edit
self.entry_widget.edit()
File "/opt/git/TelegramTUI/src/npyscreen/wgmultiline.py", line 596, in edit
self.get_and_use_key_press()
File "/opt/git/TelegramTUI/src/npyscreen/wgwidget.py", line 575, in get_and_use_key_press
return self.try_while_waiting()
File "/opt/git/TelegramTUI/src/npyscreen/wgwidget.py", line 560, in try_while_waiting
self.parent.parentApp._internal_while_waiting()
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplicationEvents.py", line 41, in _internal_while_waiting
self.process_event_queues(max_events_per_queue=self.max_events_per_queue)
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplicationEvents.py", line 52, in process_event_queues
self.process_event(event)
File "/opt/git/TelegramTUI/src/npyscreen/apNPSApplicationEvents.py", line 70, in process_event
result = registered_object.handle_event(event)
File "/opt/git/TelegramTUI/src/npyscreen/eveventhandler.py", line 48, in handle_event
except weakref.ReferenceError:
AttributeError: module 'weakref' has no attribute 'ReferenceError'
Npyscreen has problems with resize. In the near future this will not be fixed