You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Everyone,
I need help with library functions names.
I am trying basic script
import ctypes
import os
# Path to your .dll file (ensure this is the correct path)
dll_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'libzt.dll')
libzt = ctypes.cdll.LoadLibrary(dll_file)
nwid = "bla"
storage_path = os.getcwd()
# Authorization required via my.zerotier.com if this is a private network).
print('Joining virtual network...')
node = libzt.ZeroTierNode()
node.init_from_storage(storage_path)
node.node_start()
while not node.node_is_online():
time.sleep(1)
print("Node ID:", node.node_id())
node.net_join(nwid)
while not node.net_transport_is_ready(nwid):
time.sleep(1)
print("IP address: ", node.addr_get_ipv4(nwid))
Script output error
PS C:\Users\rdpmaster\Desktop\app> python3.12 .\test2.py
Joining virtual network...
Traceback (most recent call last):
File "C:\Users\rdpmaster\Desktop\app\test2.py", line 16, in <module>
node = libzt.ZeroTierNode()
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1776.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 392, in __getattr__
func = self.__getitem__(name)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1776.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 397, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: function 'ZeroTierNode' not found
Hello Everyone,
I need help with library functions names.
I am trying basic script
Script output error
Folders
The text was updated successfully, but these errors were encountered: