HyperDex
HyperDex copied to clipboard
python: HYPERDEX_CLIENT_WRONGTYPE for document attributes
running the provided samples via
python doctest-runner.py doc.documents.py 127.0.0.1 1982
results in an exception:
File "doc.documents.py", line 17, in doc.documents.py
Failed example:
c.put('profiles', 'jsmith1', {'profile': Document({"name": "John Smith"})})
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest doc.documents.py[9]>", line 1, in <module>
c.put('profiles', 'jsmith1', {'profile': Document({"name": "John Smith"})})
File "client.pyx", line 1392, in hyperdex.client.Client.put (bindings/python/hyperdex/client.c:15636)
File "client.pyx", line 1390, in hyperdex.client.Client.async_put (bindings/python/hyperdex/client.c:15519)
File "client.pyx", line 1210, in hyperdex.client.Client.asynccall__spacename_key_attributes__status (bindings/python/hyperdex/client.c:13219)
HyperDexClientException: HyperDexClientException: invalid attribute "profile": attribute has the wrong type [HYPERDEX_CLIENT_WRONGTYPE]
the same happens when trying to manually following the instructions in http://hyperdex.org/doc/latest/DocumentStorage/#sec:documents:setup
running on debian wheezy, hyperdex-daemon, -coordinator, and python-hyperdex-admin, -client are all at version 1:1.3.1-1+wheezy1
Do you, by chance, have a previous install of an older version that could be interfering?
The tests include shell stubs that are part of our larger testing effort. I can run the test with:
. test/env.sh `pwd` `pwd` 1.3.1
test/sh/doc.documents.sh
To debug this further, please run the following from the python
command:
>>> import hyperdex.client
>>> hyperdex.client.__file__
'/home/rescrv/src/HyperDex/bindings/python/hyperdex/client.so'
Here you can see that I'm running it from my home directory. You should see a path starting with /usr/lib
for the Python package.
as far as I remember this is the first time I've installed hyperdex, so there should be no other version around
hyperdex.client.file points to the packaged
/usr/lib/python2.7/dist-packages/hyperdex/client.so
1:1.4.0-2+wheezy1 : unchanged
I'm unsure about what's going on here. Is there anything you can tell me about your environment? What packages you've installed, or anything that changes from stock Wheezy?
I'm most curious because we run the tests on their own against the public packages before ever releasing them. We do this from within a pbuilder chroot, so I'm pretty sure that there isn't anything preinstalled that could cause the issue.
sorry, I'm not running debian wheezy, but debian unstable ("sid"); hope this is not a problem
I've put the list of currently installed packages (output of apt list --installed) at https://apexo.de/data/packages-20140730.txt