We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use python3.5 and tc 0.7.2. Why HDB iteritems() decode key and value unlike items()? Following is an example.
iteritems()
items()
In [160]: db.open("test", tc.HDBOWRITER | tc.HDBOCREAT) In [162]: db[b"hoge"] = b"fuga" In [163]: db["ほげ".encode("utf-8")] = "ふが".encode("utf-8") In [164]: db.items() Out[164]: [(b'hoge', b'fuga'), (b'\xe3\x81\xbb\xe3\x81\x92', b'\xe3\x81\xb5\xe3\x81\x8c')] In [165]: list(db.iteritems()) Out[165]: [('hoge', 'fuga'), ('ほげ', 'ふが')]
So I have a trouble with below error when HDB include a value msgpack.packb() value.
msgpack.packb()
In [8]: db[b"hoge"] = msgpack.packb([1,2,3]) In [9]: list(db.itervalues()) Out[9]: [b'\xe3\x81\xb5\xe3\x81\x8c'] In [10]: db.items() Out[10]: [(b'\xe3\x81\xbb\xe3\x81\x92', b'\xe3\x81\xb5\xe3\x81\x8c')] In [11]: list(db.iteritems()) --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-10-9453a76d2e05> in <module>() ----> 1 list(db.iteritems()) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 0: invalid start byte
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I use python3.5 and tc 0.7.2.
Why HDB
iteritems()
decode key and value unlikeitems()
?Following is an example.
So I have a trouble with below error when HDB include a value
msgpack.packb()
value.The text was updated successfully, but these errors were encountered: