You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module fdb.fbcore:542 in exception_from_status
<< while True:
result = api.fb_interpret(msg, 512, pvector)
if result != 0:
if PYTHON_MAJOR_VER == 3:
>> result = api.fb_interpret(msg, 512, pvector)
ArgumentError: argument 3: <type 'exceptions.TypeError'>: expected LP_LP_c_long instance instead of LP_c_long
It looks like fb_interpret expects a pointer to pvector.
I'm not sure how to reproduce this yet, it happened in dev version of our webapp today.
The text was updated successfully, but these errors were encountered:
ctypes should be able to convert these types automatically, and like PYFB26 the bug only occurs occasionally, and I only saw it when running under apache2 / mod_wsgi.
I "hacked around" this problem with the following changes, and have not seen the bug recur with the hacks. But this is not a good solution.
./fdb/fbcore.py:
145c145
< XSQLVAR, ISC_TEB, RESULT_VECTOR, ISC_STATUS, ISC_STATUS_ARRAY,
ISC_STATUS_PTR,
---
> XSQLVAR, ISC_TEB, RESULT_VECTOR, ISC_STATUS, ISC_STATUS_ARRAY,
ISC_STATUS_PTR, ISC_STATUS_PTR_PTR,
539a540,541
> # pvector_ptr = ctypes.byref(pvector)
> pvector_ptr = ctypes.cast(ctypes.addressof(pvector), ISC_STATUS_PTR_PTR)
542c544,548
< result = api.fb_interpret(msg, 512, pvector)
---
> # SOMETIMES this was causing an error is using pvector rather than a pointer
to it
> # ctypes is supposed to do auto-byref, but sometimes gave
> # <type 'exceptions.TypeError'>: expected LP_LP_c_long instance instead of
LP_c_long>
> # result = api.fb_interpret(msg, 512, pvector)
> result = api.fb_interpret(msg, 512, pvector_ptr)
Submitted by: Sam Watkins (sswam)
Module fdb.fbcore:542 in exception_from_status
<< while True:
result = api.fb_interpret(msg, 512, pvector)
if result != 0:
if PYTHON_MAJOR_VER == 3:
>> result = api.fb_interpret(msg, 512, pvector)
ArgumentError: argument 3: <type 'exceptions.TypeError'>: expected LP_LP_c_long instance instead of LP_c_long
It looks like fb_interpret expects a pointer to pvector.
I'm not sure how to reproduce this yet, it happened in dev version of our webapp today.
The text was updated successfully, but these errors were encountered: