Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\python.exe D:/codes/untitled/num1.py
- 2020-04-05 14:39:43,641 (util.py:66 WorkerThread2) ERROR - TeleBot: "TypeError occurred, args=('list indices must be integers or slices, not str',)
- Traceback (most recent call last):
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
- task(*args, **kwargs)
- File "D:/codes/untitled/num1.py", line 49, in mess
- final_message = f"<u>Данные по всему миру:</u>\n<b>Заболевших: </b>{location['confirmed']:,}\n<b>Сметрей: </b>{location['deaths']:,}"
- TypeError: list indices must be integers or slices, not str
- "
- Traceback (most recent call last):
- File "D:/codes/untitled/num1.py", line 62, in <module>
- bot.polling(none_stop=True)
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 392, in polling
- self.__threaded_polling(none_stop, interval, timeout)
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 416, in __threaded_polling
- self.worker_pool.raise_exceptions()
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 109, in raise_exceptions
- six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\six.py", line 703, in reraise
- raise value
- File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
- task(*args, **kwargs)
- File "D:/codes/untitled/num1.py", line 49, in mess
- final_message = f"<u>Данные по всему миру:</u>\n<b>Заболевших: </b>{location['confirmed']:,}\n<b>Сметрей: </b>{location['deaths']:,}"
- TypeError: list indices must be integers or slices, not str
Advertisement
Add Comment
Please, Sign In to add comment