Problem with updating pi point. Update_mode and buffer_mode #688
-
The following code gave me a type error:
The error: ` 279 def _update_value(self, value, update_mode, buffer_mode): TypeError: No method matches given arguments for PIPoint.UpdateValue: (<class 'OSIsoft.AF.Asset.AFValue'>, <class 'int'>, <class 'int'>)` It seems that the update_value method receives the wrong type of update_mode and buffer_mode even though I used the default values. They are specifically expected to be enums instead of integers. To ensure the values are enums I added the following two lines to the update_value method in PIData.py:
Resulting in: `
` That seems to have fixed it and I don't get any more problems. Does anybody have any idea why this problem was occuring for me? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you sure you are using the latest version of |
Beta Was this translation helpful? Give feedback.
Are you sure you are using the latest version of
PIconnect
? This should be fixed with version 0.10, and as you mention line numbers 279/280 for_update_value
I think you are on version 0.9.1. It was a problem withpythonnet
version 3.0 that no longer allowed implicit conversion from int to enum. UpdatingPIconnect
to 0.10.4 should be the safest bet that you don't get these errors anymore.