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

AttributeError: Sequence object has no attribute dict_contents #47

Open
nveloso opened this issue May 28, 2024 · 1 comment
Open

AttributeError: Sequence object has no attribute dict_contents #47

nveloso opened this issue May 28, 2024 · 1 comment

Comments

@nveloso
Copy link

nveloso commented May 28, 2024

Hi!
When I'm trying to call dict_contents() on a ReadPropertyMultipleACK object I get the following error:

  File "...", line 392, in _dict_contents
    apdu_contents = apdu.dict_contents()
  File "...python3.8/site-packages/bacpypes3/apdu.py", line 583, in dict_contents
    self.apdu_contents(use_dict=use_dict, as_class=as_class)
  File "...python3.8/site-packages/bacpypes3/apdu.py", line 1037, in apdu_contents
    Sequence.dict_contents(self, use_dict=use_dict, as_class=as_class)
AttributeError: type object 'Sequence' has no attribute 'dict_contents'

It looks like Sequence does not have a dict_contents method implemented.

@JoelBender
Copy link
Owner

The dict_contents() API is left over from "legacy" BACpypes and is a one-way mapping. BACpypes3 has a json API that has sequence_to_json() and json_to_sequence(). I would like to remove dict_contents() and the related functions like apdu_contents().

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