sessionsaver 47.0: AttributeError: type object 'TabState' has no attribute 'STATE_NORMAL'
After a fresh start of gedit-47.0
, trying to recover my default session (Tools => Recover "Default" Session
) results in:
[zlatko@disclosure:~]$ gedit
Traceback (most recent call last):
File "/usr/local/lib64/gedit/plugins/sessionsaver/windowactivable.py", line 74, in _session_menu_action
self.load_session(session)
File "/usr/local/lib64/gedit/plugins/sessionsaver/windowactivable.py", line 114, in load_session
if self.needs_new_window_to_load_session():
File "/usr/local/lib64/gedit/plugins/sessionsaver/windowactivable.py", line 107, in needs_new_window_to_load_session
tab.get_state() == Gedit.TabState.STATE_NORMAL):
AttributeError: type object 'TabState' has no attribute 'STATE_NORMAL'
If I close the initial empty windows first with Ctrl-W
and then try to recover my default session, things work fine as expected.
After a bit of toying around, I found that changing line 107 of plugins/sessionsaver/sessionsaver/windowactivable.py
from ...
tab.get_state() == Gedit.TabState.STATE_NORMAL):
... to ...
tab.get_state() == "GEDIT_TAB_STATE_NORMAL"):
... fixes the problem for me. I have no idea if this is the proper fix, but hey - works fine for me!™