Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't report rdb file for redis 3.2 #70

Closed
emacsist opened this issue Aug 24, 2016 · 2 comments
Closed

Can't report rdb file for redis 3.2 #70

emacsist opened this issue Aug 24, 2016 · 2 comments

Comments

@emacsist
Copy link

╭─sky@sky-linux ~  
╰─➤  rdb -c memory dump_unicat_6579.rdb > unicat.csv
Traceback (most recent call last):
  File "/usr/local/bin/rdb", line 9, in <module>
    load_entry_point('rdbtools==0.1.7', 'console_scripts', 'rdb')()
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/cli/rdb.py", line 72, in main
    parser.parse(dump_file)
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/parser.py", line 302, in parse
    self.parse_fd(open(filename, "rb"))
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/parser.py", line 325, in parse_fd
    self._callback.end_database(db_number)
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/memprofiler.py", line 153, in end_database
    self._stream.next_record(record)
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/memprofiler.py", line 93, in next_record
    self._out.write("%d,%s,%s,%d,%s,%d,%d\n" % (record.database, record.type, encode_key(record.key), 
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/callbacks.py", line 91, in encode_key
    return _encode(s, quote_numbers=True)
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/callbacks.py", line 88, in _encode
    return _encode_basestring_ascii(s)
  File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.7-py2.7.egg/rdbtools/callbacks.py", line 69, in _encode_basestring_ascii
    return '"' + str(ESCAPE_ASCII.sub(replace, s)) + '"'
TypeError: expected string or buffer
@ghost
Copy link

ghost commented Aug 27, 2016

The version 0.1.7 works for me with 3.2 dumps. Can you share the dump?

@oranagra
Copy link
Collaborator

this actually reproduces with any rdb file, it's a bug i created with my recent memory profiler improvements (not all memory records are keys), pushing a fix to both branches.
thanks.

oranagra added a commit that referenced this issue Aug 28, 2016
(cherry picked from commit 3ae6ade16a2cd3c3dec25b56c90c67330293284a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants