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

Outdated tutorial guides https://www.asyncapi.com/docs/tools/generator/generator-template #216

Closed
urizennnn opened this issue Mar 27, 2024 · 3 comments

Comments

@urizennnn
Copy link

In the tutorial it has this snippet

class TemperatureServiceClient:

  def __init__(self):
              self.client = mqtt.Client()
              self.client.connect(mqttBroker)

But this would throw an error because the python in this case now requires a callback api version specification. I researched further on how to fix and found out the the python client packages offer two version for api call back and any can be used in this case

CallbackAPIVersion.VERSION2
or
CallbackAPIVersion.VERSION1

so the fixed code should look something like this

class TemperatureServiceClient:

  def __init__(self):
              self.client = mqtt.Client(CallbackAPIVersion.VERSION2)
              self.client.connect(mqttBroker)
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@ivangsa
Copy link
Collaborator

ivangsa commented Mar 27, 2024

Hi @urizennnn

thanks for taking the time reporting this..

this is the repo for the vscode extension..

for the website/docs... can you create this issue again here?

image

@ivangsa ivangsa closed this as completed Mar 27, 2024
@urizennnn
Copy link
Author

Hi @urizennnn

thanks for taking the time reporting this..

this is the repo for the vscode extension..

for the website/docs... can you create this issue again here?

image

oof sorry about that will do that now thanks

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