# Buggy code
def __sum_stats(self, key, indice=None, mmm=None):
    """Return the sum of the stats value for the given key.

    * indice: If indice is set, get the p[key][indice]
    * mmm: display min, max, mean or current (if mmm=None)
    """
    # Compute stats summary
    ret = 0
    for p in self.stats:
        if indice is None:
            ret += p[key]
        else:
            ret += p[key][indice]

    # Manage Min/Max/Mean
    mmm_key = self.__mmm_key(key, indice)
    if mmm == "min":
        try:
            if self.mmm_min[mmm_key] > ret:
                self.mmm_min[mmm_key] = ret
        except AttributeError:
            self.mmm_min = {}
            return 0
        except KeyError:
            self.mmm_min[mmm_key] = ret
        ret = self.mmm_min[mmm_key]
    elif mmm == "max":
        try:
            if self.mmm_max[mmm_key] < ret:
                self.mmm_max[mmm_key] = ret
        except AttributeError:
            self.mmm_max = {}
            return 0
        except KeyError:
            self.mmm_max[mmm_key] = ret
        ret = self.mmm_max[mmm_key]

    return ret


# Traceback (KeyError)
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/bin/glances", line 11, in <module>
sys.exit(main())
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/__init__.py", line 134, in main
start(config=config, args=args)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/__init__.py", line 103, in start
mode.serve_forever()
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/standalone.py", line 117, in serve_forever
self.schedule.run()
File "/home/ubuntu/anaconda3/lib/python3.6/sched.py", line 154, in run
action(*argument, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/standalone.py", line 104, in __serve_forever
self.screen.update(self.stats)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/outputs/glances_curses.py", line 978, in update
self.flush(stats, cs_status=cs_status)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/outputs/glances_curses.py", line 956, in flush
self.display(stats, cs_status=cs_status)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/outputs/glances_curses.py", line 528, in display
__stat_display = self.__get_stat_display(stats, plugin_max_width)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/outputs/glances_curses.py", line 492, in __get_stat_display
ret[p] = stats.get_plugin(p).get_stats_display(args=self.args)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/plugins/glances_plugin.py", line 762, in get_stats_display
'msgdict': self.msg_curse(args),
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/plugins/glances_processlist.py", line 461, in msg_curse
self.__msg_curse_sum(ret, args=args)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/plugins/glances_processlist.py", line 527, in __msg_curse_sum
msg = '{:>6}'.format(self.auto_unit(self.__sum_stats('memory_info', indice=1, mmm=mmm), low_precision=False))
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/glances/plugins/glances_processlist.py", line 616, in __sum_stats
ret += p[key][indice]
KeyError: 'memory_info'

# Fixed code
def __sum_stats(self, key, indice=None, mmm=None):
    """Return the sum of the stats value for the given key.

    * indice: If indice is set, get the p[key][indice]
    * mmm: display min, max, mean or current (if mmm=None)
    """
    # Compute stats summary
    ret = 0
    for p in self.stats:
        if key not in p:
            # Correct issue #1188
            continue
        if indice is None:
            ret += p[key]
        else:
            ret += p[key][indice]

    # Manage Min/Max/Mean
    mmm_key = self.__mmm_key(key, indice)
    if mmm == "min":
        try:
            if self.mmm_min[mmm_key] > ret:
                self.mmm_min[mmm_key] = ret
        except AttributeError:
            self.mmm_min = {}
            return 0
        except KeyError:
            self.mmm_min[mmm_key] = ret
        ret = self.mmm_min[mmm_key]
    elif mmm == "max":
        try:
            if self.mmm_max[mmm_key] < ret:
                self.mmm_max[mmm_key] = ret
        except AttributeError:
            self.mmm_max = {}
            return 0
        except KeyError:
            self.mmm_max[mmm_key] = ret
        ret = self.mmm_max[mmm_key]

    return ret