Guest User

Untitled

a guest
Apr 5th, 2020
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\python.exe D:/codes/untitled/num1.py
  2. 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',)
  3. Traceback (most recent call last):
  4. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
  5. task(*args, **kwargs)
  6. File "D:/codes/untitled/num1.py", line 49, in mess
  7. final_message = f"<u>Данные по всему миру:</u>\n<b>Заболевших: </b>{location['confirmed']:,}\n<b>Сметрей: </b>{location['deaths']:,}"
  8. TypeError: list indices must be integers or slices, not str
  9. "
  10. Traceback (most recent call last):
  11. File "D:/codes/untitled/num1.py", line 62, in <module>
  12. bot.polling(none_stop=True)
  13. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 392, in polling
  14. self.__threaded_polling(none_stop, interval, timeout)
  15. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 416, in __threaded_polling
  16. self.worker_pool.raise_exceptions()
  17. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 109, in raise_exceptions
  18. six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  19. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\six.py", line 703, in reraise
  20. raise value
  21. File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
  22. task(*args, **kwargs)
  23. File "D:/codes/untitled/num1.py", line 49, in mess
  24. final_message = f"<u>Данные по всему миру:</u>\n<b>Заболевших: </b>{location['confirmed']:,}\n<b>Сметрей: </b>{location['deaths']:,}"
  25. TypeError: list indices must be integers or slices, not str
Advertisement
Add Comment
Please, Sign In to add comment