ValueError when using toarray()


#1

Hi everyone,

I am trying to use the toarray() function to pull the data, but I get this error:

a.toarray()

~\AppData\Local\Continuum\Anaconda3\lib\site-packages\scidb_py-15.12.dev0-py3.5.egg\scidbpy\parse.py in _nonstring_attribute_dict(array, **kwargs)
    180     dtype = [(str(nm), null_typemap[t, nullable])
    181              for nm, t, nullable in array.sdbtype.full_rep]
--> 182     data = np.fromstring(contents, dtype=dtype)
    183 
    184     # process nullable attributes

ValueError: string size must be a multiple of element size

There are some errors up the chain, but that’s the last error. However, if I execute the contents() function, it’s all good and in there:

a.contents()

'SciDBArray()\n[(294.678),(288.725),(...'

What’s going on? How come toarray() is unhappy when contents() is there?

Any suggestions are much appreciated!

Thanks!


#2

This seems to be an issue on win32 platforms. This pull request is a potential fix.