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
I have a caproto server with a string PV. The max length of the PV is 1. I get an error on the server side If I use pyepics to write into this PV. Interestingly there are no problems with caproto.threading.client.write() function and I can write one character without a problem.
it works fine, if the default value is longer than 1 or i set max_length large than 1. So there is something special about how caproto processes the string sent from pyepics wx.PVTextCtrl field.
ERROR:caproto.circ:Invalid write request by user-13 (user 13.niddk.nih.gov): WriteRequest(data=array([0], dtype=uint8), data_type=<ChannelType.CHAR: 4>, d
ata_count=1, sid=0, ioid=3, metadata=None)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/server/common.py", line 471, in handle_write
user_address=self.circuit.address)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/_data.py", line 434, in auth_write
flags=flags))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/_data.py", line 971, in write_from_dbr
await super().write_from_dbr(*args, flags=flags, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/_data.py", line 462, in write_from_dbr
direction=ConversionDirection.FROM_WIRE)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/_backend.py", line 346, in convert_values
convert_from=from_dtype)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/_numpy_backend.py", line 64, in python_to_epics
return np.asarray(values).astype(type_map[dtype])
ValueError: invalid literal for int() with base 10: ''
The text was updated successfully, but these errors were encountered:
I have found there are some other dtypes. One of them looks like chr dtype ChannelType.CHAR: PvpropertyChar,, but I am not sure how to specify it when I create the pvproperty.
I have a caproto server with a string PV. The max length of the PV is 1. I get an error on the server side If I use pyepics to write into this PV. Interestingly there are no problems with caproto.threading.client.write() function and I can write one character without a problem.
it works fine, if the default value is longer than 1 or i set max_length large than 1. So there is something special about how caproto processes the string sent from pyepics wx.PVTextCtrl field.
Codes:
caproto-sandbox/server_string_pv.py
caproto-sandbox/server_string_pv_client.py
caproto-sandbox/server_string_pv_gui.py
If I use pyepics GUI
works:
doesn't work:
If I use caproto threading client it works always.
Error:
The text was updated successfully, but these errors were encountered: