Okay so I'm programming a Wolfram Alpha API and I added a res string with query and its giving me this error: AttributeError: 'str' object has no attribute 'query'
Here's the PyDa.py:
import PySimpleGUI as sg
sg.theme('Dark Blue')
app_id = ('API_key')
client = (app_id)
layout = [ [sg.Text("Hello, my name's Ted. What's your question?")],
[sg.Input()],
[sg.Button('Ok'), sg.Button('Cancel')] ]
window = sg.Window('Ted', layout)
while True:
event, values = window.read()
if event in (None, 'Cancel'):
break
res = client.query(values[0])
print(next(res.results).text)
window.close()
where values[0] is what the user enters. I've tried completely deleting query and it doesn't work. I thing I need to install something but when I try pip install wolframalpha api
it does install but that's not whats missing/ is wrong. I should be getting pods but its not sending those because of the error.