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

'HelloWorldPubSubType' object has no attribute 'setName'. Did you mean: 'set_name'? #182

Closed
SunLiangcan opened this issue Aug 20, 2024 · 3 comments · Fixed by #183
Closed
Labels
in progress Issue or PR which is being reviewed

Comments

@SunLiangcan
Copy link

E:\test\build\Release>python HelloWorldExample.py -p publisher
Creating publisher.
Traceback (most recent call last):
File "E:\test\build\Release\HelloWorldExample.py", line 206, in
writer = Writer(args.domain, args.machine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\test\build\Release\HelloWorldExample.py", line 113, in init
self.topic_data_type.setName("HelloWorldDataType")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HelloWorldPubSubType' object has no attribute 'setName'. Did you mean: 'set_name'?

@JesusPoderoso
Copy link
Contributor

Hi @SunLiangcan, thanks for your report.
I am assuming you are using the Fast DDS python version from master branch.
Fast DDS, and Fast DDS Python, are near to a mayor release (v3.0.0 and v2.0.0, respectively). That entails several API breaks and refactors. For that reason, and until these versions are released, it is strongly advisable to use the latest stable branch, 2.14.x (and python v1.4.2).
It seems that performing the TopicDataType refactor in the python repository we missed updating that example.
We will fix it and come back to you, sorry for the inconvenience.

@SunLiangcan
Copy link
Author

ok,use 1.4.2 no problem

@JesusPoderoso
Copy link
Contributor

Hi @SunLiangcan, we have already fixed it (#183) in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Issue or PR which is being reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants