Closed apigott closed 5 years ago
On 6/8/19 11:17 pm, apigott wrote:
op = pyhaystack.client.ops.his.HisReadSeriesOperation(session, '
', 'today', None, 'dict') op.go() op.wait()
Errm yeah, do NOT go creating the operation objects yourself. There are factory methods on the session object for doing that. Those factory methods perform various data normalisation tasks on the inputs before creating the operation object to manage the actual request.
https://pyhaystack.readthedocs.io/en/latest/his.html#zinc-date-and-time-format -- Stuart Longland (aka Redhatter, VK4MSL)
I haven't lost my mind... ...it's backed up on a tape somewhere.
One thing possible is to manually create a similar request and check in a browser how the server respond.
Not always easy but it may help knowing where the bug is : in the server or in the script.
Thanks guys got it working! @sjlongland was right and I was using HisReadSeriesOperation so did a bit of reading up on factory methods.
@Stuart is awesome ;-)
I've got a session open with skyspark and can pull data via session.about(), etc but HisReadSeriesOperation is giving me issues. My code:
Always returns op.is_failed = True. The traceback looks like this:
Also I assume that the output of HisReadSeriesOperation is similar to the data series to be written in HisWriteSeriesOperation but the documentation doesn't really elaborate on that...