terminator crashed with AttributeError in wrapcloseterm(): 'NoneType' object has no attribute 'grab_focus'

Bug #1561345 reported by Isayev Anton
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
terminator (Ubuntu)
Confirmed
High
Unassigned

Bug Description

every time if i close terminator

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: terminator 0.98-1
ProcVersionSignature: Ubuntu 4.4.0-15.31-lowlatency 4.4.6
Uname: Linux 4.4.0-15-lowlatency x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CrashCounter: 1
CurrentDesktop: GNOME
Date: Thu Mar 24 07:41:42 2016
EcryptfsInUse: Yes
ExecutablePath: /usr/share/terminator/terminator
InstallationDate: Installed on 2016-03-07 (16 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160307)
InterpreterPath: /usr/bin/python2.7
LocalLibraries: /usr/local/lib/python2.7/dist-packages/psutil/_psutil_linux.so /usr/local/lib/python2.7/dist-packages/psutil/_psutil_posix.so
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/x-terminal-emulator
PythonArgs: ['/usr/bin/x-terminal-emulator']
SourcePackage: terminator
Title: terminator crashed with AttributeError in wrapcloseterm(): 'NoneType' object has no attribute 'grab_focus'
Traceback:
 Traceback (most recent call last):
   File "/usr/share/terminator/terminatorlib/paned.py", line 281, in wrapcloseterm
     Terminator().find_terminal_by_uuid(sibling.get_toplevel().last_active_term.urn).grab_focus()
 AttributeError: 'NoneType' object has no attribute 'grab_focus'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Isayev Anton (totoshko88-gmail) wrote :
tags: removed: need-duplicate-check
Changed in terminator (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Bryce Harrington (bryce) wrote :

I got the same traceback on Ubuntu 20.04. This occurred while resizing a pane separator. One of the panes had a large scrollback, although not abnormally so.

CurrentDesktop: XFCE
Date: Tue Jun 8 17:50:51 2021
ExecutablePath: /usr/share/terminator/terminator
ExecutableTimestamp: 1586793637
InterpreterPath: /usr/bin/python3.8
ProcCmdline: /usr/bin/python3 /usr/bin/terminator
ProcCwd: /home/bryce
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash

Traceback:
 Traceback (most recent call last):
   File "/usr/share/terminator/terminatorlib/paned.py", line 312, in wrapcloseterm
     Terminator().find_terminal_by_uuid(sibling.get_toplevel().last_active_term.urn).grab_focus()
 AttributeError: 'NoneType' object has no attribute 'urn'

Changed in terminator (Ubuntu):
status: New → Confirmed
importance: Medium → High
information type: Private → Public
Revision history for this message
Bryce Harrington (bryce) wrote :

My above traceback is slightly different than the OP but there seem to be some known issues in this section of code also with similar backtraces:

"'NoneType' object has no attribute 'grab_focus'"
  * https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/1561345
  * https://bugzilla.redhat.com/show_bug.cgi?id=1898476
  * https://github.com/gnome-terminator/terminator/pull/145/commits/9edefb6f3285fa236656bcc2440661d1a107174b
  * https://errors.ubuntu.com/problem/f0c07815340e8b5e1e401bead074eaf287e8ca00

"'VPaned' object has no attribute 'is_child_notebook'"
  * https://errors.ubuntu.com/problem/9aa9259838a67d8c24c342b106efd841b516340b
  * https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/1931317
  * https://bugzilla.redhat.com/show_bug.cgi?id=1898476

This may be a suitable fix:
            if focus_sibling:
                first_term_sibling.grab_focus()
            elif not sibling.get_toplevel().is_child_notebook():
                try:
                    Terminator().find_terminal_by_uuid(sibling.get_toplevel().last_active_term.urn).grab_focus()
  except AttributeError:
                    if sibling.get_toplevel().last_active_term:
                        dbg('cannot find terminal with uuid: %s' % sibling.get_toplevel().last_active_term.urn)
                    else:
                        dbg('last active terminal does not have a uuid')

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.