Thank you for the background, Wes. I understand now that it’s not possible to make these functions available to me.
I did of course looking at providing the missing functions in the way you describe, but this is the error:
Traceback (most recent call last):
File "<input>", line 7, in <module>
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/sparkplug_b/__init__.py", line 13, in <module>
import sparkplug_b_pb2
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/sparkplug_b/sparkplug_b_pb2.py", line 8, in <module>
from google.protobuf import reflection as _reflection
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/google/protobuf/reflection.py", line 51, in <module>
from google.protobuf import message_factory
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/google/protobuf/message_factory.py", line 49, in <module>
from google.protobuf.internal import python_message as message_impl
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/google/protobuf/internal/python_message.py", line 70, in <module>
from google.protobuf.internal import well_known_types
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/google/protobuf/internal/well_known_types.py", line 99, in <module>
_EPOCH_DATETIME = datetime.utcfromtimestamp(0)
File "/home/user/.ignition/cache/gwscada.example.com_8088/C1/pylib/datetime.py", line 1623, in utcfromtimestamp
y, m, d, hh, mm, ss, weekday, jday, dst = _time.gmtime(t)
AttributeError: 'builtin_function_or_method' object has no attribute 'gmtime'
It looks like the missing function is gmtime(), normally provided by the time library, which is pre-built into the python binary. I don’t know why this was removed from the version of python used by Ignition, and I haven’t been able to find an external python library to replace that function.
Perhaps I just lack the knowledge of how to do this. I’ve made a similar post at the Ignition forums, hopefully someone can come up with a solution.