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

Cli_GetAgBlockInfo: AttributeError: 'str' object has no attribute 'ctype' #537

Closed
TecDroiD opened this issue Oct 6, 2024 · 1 comment · Fixed by #538
Closed

Cli_GetAgBlockInfo: AttributeError: 'str' object has no attribute 'ctype' #537

TecDroiD opened this issue Oct 6, 2024 · 1 comment · Fixed by #538

Comments

@TecDroiD
Copy link

TecDroiD commented Oct 6, 2024

just playing around with the library to find out how it works. I ran the server and connected a client. from readthedocs I got the following line which failed..

>>> client.get_block_info("DB", 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...client.py", line 527, in get_block_info
    result = self._lib.Cli_GetAgBlockInfo(self._s7_client, block_type.ctype, db_number, byref(data))
                                                           ^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'ctype'

any idea why?

gijzelaerr added a commit that referenced this issue Oct 7, 2024
@gijzelaerr
Copy link
Owner

gijzelaerr commented Oct 7, 2024

Thanks for reporting, the API changed and I missed updating that documentation string. It should be:

block_info = Client().get_block_info(block_type.DB, 1)

gijzelaerr added a commit that referenced this issue Oct 7, 2024
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

Successfully merging a pull request may close this issue.

2 participants