AttributeError Python 3.5.1+: /usr/bin/python3 Thu Apr 28 11:22:35 2016 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /usr/sbin/aa-logprof in () 42 43 if profiledir: 44 apparmor.profile_dir = apparmor.get_full_path(profiledir) 45 if not os.path.isdir(apparmor.profile_dir): 46 raise apparmor.AppArmorException("%s is not a directory."%profiledir) 47 48 apparmor.loadincludes() 49 50 apparmor.do_logprof_pass(logmark) 51 apparmor = apparmor.do_logprof_pass = logmark = '' /usr/lib/python3/dist-packages/apparmor/aa.py in do_logprof_pass(logmark='', passno=0, pid={6183: [[6183, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'REJECTING', {'::r', 'r'}, '/sys/devices/system/node/node0/meminfo', '']], 6189: [[6189, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'REJECTING', {'::a', '::r', '::w', 'a', 'r', 'w'}, '/dev/vboxuser', '']], 6266: [[6266, '/usr/lib/firefox/firefox{,*[^s][^h]}', 'sanitized_helper', 'HINT', 'REJECTING', 'netlink', 'raw', 'ip']], 6287: [[6287, '/usr/lib/firefox/firefox{,*[^s][^h]}', 'sanitized_helper', 'HINT', 'REJECTING', 'netlink', 'raw', 'ip']]}) 2197 for pid in sorted(profile_changes.keys()): 2198 set_process(pid, profile_changes[pid]) 2199 2200 collapse_log() 2201 2202 ask_the_questions() 2203 2204 if aaui.UI_mode == 'yast': 2205 # To-Do 2206 pass global ask_the_questions = /usr/lib/python3/dist-packages/apparmor/aa.py in ask_the_questions() 1698 done = True 1699 changed[profile] = True 1700 1701 rule_obj.deny = True 1702 rule_obj.raw_rule = None # reset raw rule after manually modifying rule_obj 1703 aa[profile][hat][ruletype].add(rule_obj) 1704 aaui.UI_Info(_('Adding %s to profile.') % rule_obj.get_clean()) 1705 1706 else: 1707 done = False global aa = defaultdict(,...': '/usr/lib/lightdm/lightdm-guest-session'})})}) profile = '/usr/lib/firefox/firefox{,*[^s][^h]}' hat = 'sanitized_helper' ruletype = 'network' ].add undefined rule_obj = deny network netlink raw, AttributeError: 'collections.defaultdict' object has no attribute 'add' __cause__ = None __class__ = __context__ = None __delattr__ = __dict__ = {} __dir__ = __doc__ = 'Attribute not found.' __eq__ = __format__ = __ge__ = __getattribute__ = __gt__ = __hash__ = __init__ = __le__ = __lt__ = __ne__ = __new__ = __reduce__ = __reduce_ex__ = __repr__ = __setattr__ = __setstate__ = __sizeof__ = __str__ = __subclasshook__ = __suppress_context__ = False __traceback__ = args = ("'collections.defaultdict' object has no attribute 'add'",) with_traceback = The above is a description of an error in a Python program. Here is the original traceback: Traceback (most recent call last): File "/usr/sbin/aa-logprof", line 50, in apparmor.do_logprof_pass(logmark) File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2202, in do_logprof_pass ask_the_questions() File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 1703, in ask_the_questions aa[profile][hat][ruletype].add(rule_obj) AttributeError: 'collections.defaultdict' object has no attribute 'add' Please consider reporting a bug at https://bugs.launchpad.net/apparmor/ and attach this file.