Traceback (most recent call last):
  File "/usr/share/apport/apport", line 424, in <module>
    options = parse_arguments()
  File "/usr/share/apport/apport", line 369, in parse_arguments
    parser.print_usage()
  File "/usr/lib/python3.7/argparse.py", line 2484, in print_usage
    self._print_message(self.format_usage(), file)
  File "/usr/lib/python3.7/argparse.py", line 2495, in _print_message
    file.write(message)
AttributeError: 'NoneType' object has no attribute 'write'

The traceback happens when trying to print the usage for the apport
command. However, the real issue is why is apport not being called
correctly. Looking at a few of the crash reports we can see a pattern
similar to the following:

PythonArgs      
['/usr/share/apport/apport', '14750', '11', '0', '1', '14750', 
'!opt!VBoxGuestAdditions-6.1.4!bin!VBoxClient', '(deleted)'] 

The "(deleted)" bit is likely coming from the %E part of the core
pattern. From man core.

       Since kernel 5.3.0, the pipe template is split on spaces into an
       argument list before the template parameters are expanded.  In
       earlier kernels, the template parameters are expanded first and the
       resulting string is split on spaces into an argument list.  This
       means that in earlier kernels executable names added by the %e and %E
       template parameters could get split into multiple arguments.  So the
       core dump handler needs to put the executable names as the last
       argument and ensure it joins all parts of the executable name using
       spaces.  Executable names with multiple spaces in them are not
       correctly represented in earlier kernels, meaning that the core dump
       handler needs to use mechanisms to find the executable name.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1884150

Title:
  
/usr/share/apport/apport:AttributeError:/usr/share/apport/apport@424:parse_arguments:print_usage:_print_message

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1884150/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to