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: 'tuple' object has no attribute 'confidence' #1208

Closed
rfcku opened this issue Feb 13, 2018 · 3 comments
Closed

AttributeError: 'tuple' object has no attribute 'confidence' #1208

rfcku opened this issue Feb 13, 2018 · 3 comments

Comments

@rfcku
Copy link

rfcku commented Feb 13, 2018

Im trying to set up a custom logic adapter, but somehow im getting
AttributeError: 'int' object has no attribute 'confidence'
im following the exact example provided on the docs.. could someone point out what im doing wrong..

This is my return of the def process function on my logic adapter

    if response.status_code == 200:
        confidence = 1
    else:
        confidence = 0

    info = data.get('data', 'unavailable')

    response_statement = Statement('The current info is {}'.format(info))
    return confidence, response_statement
@rfcku
Copy link
Author

rfcku commented Feb 13, 2018

Nevermind.. i figured out...

response_statement = Statement('The current info is {}'.format(info))
response_statement.confidence = confidence
return response_statement

@rfcku rfcku closed this as completed Feb 13, 2018
@vkosuri
Copy link
Collaborator

vkosuri commented Feb 14, 2018

@ravaga glad to figured it out :)

@lock
Copy link

lock bot commented Mar 9, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants