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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encoding error

huangyg11 opened this issue · comments

I install python3.5 and use pip to install rma. And run

rma  -l 100

and get error

Match *:   0%|                                                                                                                                                             | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/rma", line 9, in <module>
    load_entry_point('rma==0.1.14', 'console_scripts', 'rma')()
  File "/usr/local/lib/python3.5/site-packages/rma/cli/rma_cli.py", line 92, in main
    app.run()
  File "/usr/local/lib/python3.5/site-packages/rma/application.py", line 106, in run
    for v in scanner.scan(limit=self.limit):
  File "/usr/local/lib/python3.5/site-packages/rma/scanner.py", line 96, in scan
    'name': key_name.decode("utf-8"),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 0: invalid start byte

It seems rma try to decode key name, but the key name can be byte stream.

Seems like I've got same problem:

login@srv /home/deploy/redis-memory-analyzer # python3.5 ./build/lib/rma/cli/rma_cli.py -d 10
Match *:   5%|████                                                                         | 16158034/302673645 [05:30<1:37:42, 48872.06it/s]
Traceback (most recent call last):
  File "./build/lib/rma/cli/rma_cli.py", line 97, in <module>
    main()
  File "./build/lib/rma/cli/rma_cli.py", line 92, in main
    app.run()
  File "/usr/local/lib/python3.5/dist-packages/rma/application.py", line 106, in run
    for v in scanner.scan(limit=self.limit):
  File "/usr/local/lib/python3.5/dist-packages/rma/scanner.py", line 96, in scan
    'name': key_name.decode("utf-8"),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 61: invalid continuation byte
commented

Same problem here:

Match *: 5%|███ | 802/17625 [00:00<00:18, 890.83it/s]
Traceback (most recent call last):
File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\program files\python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Python36\Scripts\rma.exe_main
.py", line 9, in
File "c:\program files\python36\lib\site-packages\rma\cli\rma_cli.py", line 97, in main
app.run()
File "c:\program files\python36\lib\site-packages\rma\application.py", line 127, in run
for v in scanner.scan(limit=self.limit):
File "c:\program files\python36\lib\site-packages\rma\scanner.py", line 96, in scan
'name': key_name.decode("utf-8"),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 102: invalid continuation byte

Any updates?

Same problem here.

commented

same problem here.

Same behaviour with python3.4, (python) redis-2.10.6, redis server 3.0.1.