Can you please post a code snippet of your usage of these methods (including your code to show how you are instantiating the datapipe)? I am unable to reproduce this issue - I can retrieve a non-null point list using either PIDataPipe method.
Thanks for your reply.
I'll mention that my code is written in Python (3.6) the AF SDK 2018 is imported using Pythonnet library. Everything is working well, I'm able to poll snapshot updates, and archives, without any issues.
Here is part of my code:
_executor = ThreadPoolExecutor(max_workers=50, thread_name_prefix='PI_WRAPPER_EXECUTOR')
def __init__(self, *args, **kwargs):
self._loop = kwargs.get('loop') or asyncio.get_event_loop()
def __init__(self, **kwargs):
self._pi_snapshot_data_pipe = PIDataPipe(AFDataPipeType.Snapshot)
self._pi_archive_data_pipe = PIDataPipe(AFDataPipeType.Archive)
async def poll_snapshot_events(self, pi_server, pi_points_ilist):
snapshot_events = await self._loop.run_in_executor(self._executor,
results = 
for snapshot_event in snapshot_events:
err = settings.pi_data.valid_data_code
af_value = snapshot_event.Value
if isinstance(af_value.Value, AFEnumerationValue):
err = af_value.Value.Value
value = float('nan')
value = af_value.Value
results.append((af_value.PIPoint.ID, af_value.Timestamp.UtcSeconds, value, err))
async def add_to_signups(self, pi_points_ilist):
await self._loop.run_in_executor(self._executor, self._pi_snapshot_data_pipe.AddSignups, pi_points_ilist)
async def list_signups_by_server(self):
await self._loop.run_in_executor(self._executor, self._pi_snapshot_data_pipe.AsReadOnly)
Later in my code I create an instance of PointWraper class:
point_wrapper = PointWrapper()
errors = await point_wrapper.add_to_signups(pi_points_ilist) # pi_points_ilist is <IList>PIPoint returned from PI Server using PIPoint.FindPIPoints
registered_points = await point_wrapper.list_signups_by_server()
Erros gets null value, assuming that this is correct, is this function return null on success. While for some reason registered_points value is always null, while <IList>PIPoint is expected.
I've funnely succeeded listing the PIPoints registered for snapshot updates. Not sure why it didn't worked for the first time, maybe some issue with the PI Server, but now it works as expected.
Good to hear it's now working for you. Unfortunately I'm not a Python developer so I can't really pinpoint anything in your code. The fact that it now works without a code change would seem to indicate possibly a server related issue the first time around.