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

Problem with write_weeklySchedule method (Any.encode() missing 1 required positional argument: 'self') #504

Open
jucajata opened this issue Dec 8, 2024 · 1 comment

Comments

@jucajata
Copy link

jucajata commented Dec 8, 2024

While I was trying to overwrite one of my weekly Schedule I found an issue with the parametrization of the Any instance.

The code is:

await bacnet_network.write_weeklySchedule(destination, schedule_instance, schedule)

destination: '10.xxx.xxx.xx'
schedule_instance: 2 (because the object name is "schedule 2")
schedule: {'states': {'inactive': 0, 'active': 1}, 'week': {'monday': [('9:45', 'active'), ('17:45', 'inactive')], 'tuesday': [('9:45', 'active'), ('17:45', 'inactive')], 'wednesday': [('9:45', 'active'), ('17:45', 'inactive')], 'thursday': [('9:45', 'active'), ('17:45', 'inactive')], 'friday': [('9:45', 'active'), ('17:45', 'inactive')], 'saturday': [('9:45', 'active'), ('17:45', 'inactive')], 'sunday': [('9:45', 'active'), ('17:45', 'inactive')]}}

How could I solve this issue with the BAC0==2024.9.20 version?

The complete Traceback:

Any.encode() missing 1 required positional argument: 'self'
2024-12-08 17:44:20,238 - INFO    | Installing recurring task Ping Task (id:2180480269680)
Exception in callback IPv4DatagramServer.set_local_transport_protocol(<IPv4Address 10.4.54.16>)(<Task cancell...nit__.py:150>>)
handle: <Handle IPv4DatagramServer.set_local_transport_protocol(<IPv4Address 10.4.54.16>)(<Task cancell...nit__.py:150>>)>  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2288.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
, in set_local_transport_protocol
    transport, protocol = task.result()
                          ^^^^^^^^^^^^^
  File "c:\Users\EFICIENCIACOLOMBIA\Documents\dev\GY_EE_BAC0\.venv\Lib\site-packages\bacpypes3\ipv4\__init__.py", line 159, in retrying_create_datagram_endpoint
    return await loop.create_datagram_endpoint(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2288.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1445, in create_datagram_endpoint
    await waiter
@ChristianTremblay
Copy link
Owner

Thanks for pointing that out, I'll have alook

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