Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2: BUG: No error raised upon casting array data from np.int64 to np.int32 #1145

Open
olliesilvester opened this issue Aug 4, 2023 · 1 comment

Comments

@olliesilvester
Copy link

Through the PVA client, upon trying to set an int32 dtype column PV using int64 data, no error will be thrown but the column will fail to be changed.
Instead of an error being thrown, the traceback is printed to the console, eg:

test_panda.py::test_set_panda_table Unhandled Exception src/pvxs_client.cpp:67
Traceback (most recent call last):
  File "/scratch/qqh35939/panda_env/lib/python3.10/site-packages/p4p/client/raw.py", line 78, in builder
    V[k] = v
  File "src/p4p/_p4p.pyx", line 192, in p4p._p4p._Value.__setitem__
TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
@coretl coretl changed the title BUG: No error raised upon casting array data from np.int64 to np.int32 v2: BUG: No error raised upon casting array data from np.int64 to np.int32 Aug 4, 2023
@coretl
Copy link
Collaborator

coretl commented Aug 7, 2023

Reported upstream as epics-base/p4p#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants