HyperDex icon indicating copy to clipboard operation
HyperDex copied to clipboard

python: HYPERDEX_CLIENT_WRONGTYPE for document attributes

Open apexo opened this issue 10 years ago • 6 comments

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

apexo avatar Jul 23 '14 12:07 apexo

running on debian wheezy, hyperdex-daemon, -coordinator, and python-hyperdex-admin, -client are all at version 1:1.3.1-1+wheezy1

apexo avatar Jul 23 '14 12:07 apexo

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.

rescrv avatar Jul 23 '14 16:07 rescrv

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

apexo avatar Jul 23 '14 21:07 apexo

1:1.4.0-2+wheezy1 : unchanged

apexo avatar Jul 30 '14 07:07 apexo

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.

rescrv avatar Jul 30 '14 19:07 rescrv

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

apexo avatar Jul 30 '14 20:07 apexo