gamenet / redis-memory-analyzer

Redis memory profiler to find the RAM bottlenecks throw scaning key space in real time and aggregate RAM usage statistic by patterns.
MIT License
772 stars 80 forks source link

"unsupported operand type" on "Processing Set patterns" step #35

Open pznamensky opened 7 years ago

pznamensky commented 7 years ago

Processing Set patterns step failed on version 0.1.16 with unsupported operand type error. RMA installed with pip. Python 3.4.

Processing Set patterns:  43%|████████████████████████████████████▍                                                | 3/7 [00:10<00:14,  3.58s/it]
Traceback (most recent call last):
  File "/home/user/.local/bin/rma", line 9, in <module>
    load_entry_point('rma==0.1.16', 'console_scripts', 'rma')()
  File "/home/user/.local/lib/python3.4/site-packages/rma/cli/rma_cli.py", line 97, in main
    app.run()
  File "/home/user/.local/lib/python3.4/site-packages/rma/application.py", line 143, in run
    str_res.append(self.do_ram(keys))
  File "/home/user/.local/lib/python3.4/site-packages/rma/application.py", line 176, in do_ram
    ret[redis_type] = rule.analyze(keys=aggregate_patterns, total=total_keys)
  File "/home/user/.local/lib/python3.4/site-packages/rma/rule/Set.py", line 84, in analyze
    agg = SetAggregator(progress_iterator((SetStatEntry(x, self.redis) for x in data), progress), len(data))
  File "/home/user/.local/lib/python3.4/site-packages/rma/rule/Set.py", line 43, in __init__
    self.encoding = pref_encoding([obj.encoding for obj in g00], redis_encoding_id_to_str)
  File "/home/user/.local/lib/python3.4/site-packages/rma/rule/Set.py", line 43, in <listcomp>
    self.encoding = pref_encoding([obj.encoding for obj in g00], redis_encoding_id_to_str)
  File "/home/user/.local/lib/python3.4/site-packages/rma/helpers/__init__.py", line 6, in progress_iterator
    for i in x:
  File "/home/user/.local/lib/python3.4/site-packages/rma/rule/Set.py", line 84, in <genexpr>
    agg = SetAggregator(progress_iterator((SetStatEntry(x, self.redis) for x in data), progress), len(data))
  File "/home/user/.local/lib/python3.4/site-packages/rma/rule/Set.py", line 26, in __init__
    self.total = self.valueAlignedBytes + self.system
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

Error occurs only while processing single database. With others one works fine.