fetchmany fails when the result includes values of the type REAL #26
Comments
Unfortunately could not reproduce on a test system here. Are you using the latest PyHDB version ? You could also send me an example of a table structure and data values ? |
Since this seems to be an unpacking issue, it would also be interesting to know which OS you are using, as well as your Python version and bitness |
To me this sounds like pyhdb is not reading enough bytes from the payload which is why struct.unpack() is failing. Since those numbers of bytes is not dependent on the client's hw but rather on the HANA network protocol specs I would rather assume that this is a coding problem. But still we need to be able to reproduce this. So I follow up the Srdjan that we need to know you table structure and which SQL statement you have been trying to execute. |
OS: Yosemite 10.10.3 The data and data schema we use in this project is open source an can be found under the following url: http://publish.illinois.edu/dbwork/open-data/ |
I tried to reproduce this with a simple test case with Python 2.7.6 on OSX Yosemite but it seems to work fine for me. |
|
Thanks, just pushed as 1 commit as was not sure of 10 commits in PR could corrupt something else. |
Yes, it works! @bsrdjan |
great, thaks @TwoLaid ! |
Hi, the following error is thrown every time the result of a query includes REAL values.
/pyhdb/protocol/types.py", line 187, in from_resultset
return cls._struct.unpack(payload)[0]
struct.error: unpack requires a string argument of length 4
The text was updated successfully, but these errors were encountered: