Closed EthanChenster closed 3 years ago
I think WolframAlpha may have changed their API format again since the given format is now a dictionary.
Therefore, you can use the following code to access the plaintext element:
for pod in res.pods: print(pod["subpod"]["plaintext"])
Maybe @jaraco should check if this applies in all cases?
I think WolframAlpha may have changed their API format again since the given format is now a dictionary. Therefore, you can use the following code to access the plaintext element:
for pod in res.pods: print(pod["subpod"]["plaintext"])
Maybe @jaraco should check if this applies in all cases?
Wait what should my code look like?
@ScottyEthan, here's the code with the updated section:
import wolframalpha
import ssl
app_id = 'REDACTED'
wolframbot = wolframalpha.Client(app_id)
res = wolframbot.query('Temperature in Las Vegas Nevada')
for pod in res.pods:
print(pod["subpod"]["plaintext"])
Happy coding :D
Thanks!
See #26
Im trying to make a wolfram alpha assistant and I got this error
Code:
Error:
Is there any solution?