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

History Read Error #1492

Open
sprasoon opened this issue Nov 21, 2022 · 1 comment
Open

History Read Error #1492

sprasoon opened this issue Nov 21, 2022 · 1 comment

Comments

@sprasoon
Copy link

sprasoon commented Nov 21, 2022

I am reading several nodes from opcua server. No issues reading single variable values using self.opcua.get_value(nodes) but when I trying to read history values I get an error "History Read Error: 'ExtensionObject' Object has no attribute 'DataValues'. Verified on UAExpert that the history data is available for the node of interest. Python version 3.10.2 on mac.

code:

starttime = "21.11.2022 08:09:09"
starttime_dt_format = datetime.datetime.strptime(starttime,"%d.%m.%Y %H:%M:%S")
endtime = "21.11.2022 08:15:09"
endtime_dt_format = datetime.datetime.strptime(endtime,"%d.%m.%Y %H:%M:%S")
thisnode = self.opcua.client.get_node("ns=2;s=OPCNode.TSInt32Random")
data = await thisnode.read_raw_history(starttime=starttime_dt_format, endtime=endtime_dt_format, numvalues=20) #<-- This line returns error

MicrosoftTeams-image (4)

@alexander-travov
Copy link
Contributor

In screenshot NodeId is "ns=4;s=OPCNode.TSInt32Random",
in script you use ns=2.

Maybe this is the issue?

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