The bot was running fine until I wrote the fetch_news.
Code for conversational_bot.py : https://ideone.com/lHI6ym
Code for utils.py : https://ideone.com/qZEHpP
Error :
Traceback (most recent call last):
File “/home/saurabhvemuri/anaconda3/lib/python3.7/site-packages/telegram/ext/dispatcher.py”, line 372, in process_update
handler.handle_update(update, self, check, context)
File “/home/saurabhvemuri/anaconda3/lib/python3.7/site-packages/telegram/ext/handler.py”, line 120, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File “conversational_bot.py”, line 43, in reply_text
articles= fetch_news(reply)
File “/home/saurabhvemuri/Desktop/TB/utils.py”, line 31, in fetch_news
return client.get_news()
File “/home/saurabhvemuri/anaconda3/lib/python3.7/site-packages/gnewsclient/gnewsclient.py”, line 67, in get_news
resp = requests.get(topic_url.format(topic_code), params=self.params_dict)
File “/home/saurabhvemuri/anaconda3/lib/python3.7/site-packages/gnewsclient/gnewsclient.py”, line 48, in params_dict
if len(self.location):
TypeError: object of type ‘NoneType’ has no len()