@shadrin_ss
Junior

Sqlite в чем проблема не записывает ссылку?

497525264
2020-06-04 17:42:30,399 (util.py:68 WorkerThread2) ERROR - TeleBot: "UsersDoesNotExist occurred, args=('<Model: Users> instance matching query does not exist:\nSQL: SELECT "t1"."id", "t1"."UserID", "t1"."UserArticle", "t1"."UserName", "t1"."UserPhone", "t1"."UserCom", "t1"."UserImg", "t1"."UserShop" FROM "users" AS "t1" WHERE ("t1"."UserImg" = ?) LIMIT ? OFFSET ?\nParams: [\'https://www.real-watch.ru/wa-data/public/shop/products/48/35/13548/images/15486/15486.600.jpg\', 1, 0]',)
Traceback (most recent call last):
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6807, in get
    return clone.execute(database)[0]
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 4226, in __getitem__
    return self.row_cache[item]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 62, in run
    task(*args, **kwargs)
  File "C:\Users\saxar\OneDrive\Рабочий стол\kwork #1\main.py", line 140, in key
    Users.get_UserImg(UserID, UserImg)
  File "C:\Users\saxar\OneDrive\Рабочий стол\kwork #1\models.py", line 235, in get_UserImg
    shop = cls.get(UserImg=UserImg)
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6384, in get
    return sq.get()
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6810, in get
    raise self.model.DoesNotExist('%s instance matching query does '
models.UsersDoesNotExist: <Model: Users> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."UserID", "t1"."UserArticle", "t1"."UserName", "t1"."UserPhone", "t1"."UserCom", "t1"."UserImg", "t1"."UserShop" FROM "users" AS "t1" WHERE ("t1"."UserImg" = ?) LIMIT ? OFFSET ?
Params: ['https://www.real-watch.ru/wa-data/public/shop/products/48/35/13548/images/15486/15486.600.jpg', 1, 0]
"
Traceback (most recent call last):
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6807, in get
    return clone.execute(database)[0]
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 4226, in __getitem__
    return self.row_cache[item]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\saxar\OneDrive\Рабочий стол\kwork #1\main.py", line 327, in <module>
    bot.polling(none_stop=True)
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 415, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 439, in __threaded_polling
    self.worker_pool.raise_exceptions()
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 111, in raise_exceptions
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 62, in run
    task(*args, **kwargs)
  File "C:\Users\saxar\OneDrive\Рабочий стол\kwork #1\main.py", line 140, in key
    Users.get_UserImg(UserID, UserImg)
  File "C:\Users\saxar\OneDrive\Рабочий стол\kwork #1\models.py", line 235, in get_UserImg
    shop = cls.get(UserImg=UserImg)
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6384, in get
    return sq.get()
  File "C:\Users\saxar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6810, in get
    raise self.model.DoesNotExist('%s instance matching query does '
models.UsersDoesNotExist: <Model: Users> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."UserID", "t1"."UserArticle", "t1"."UserName", "t1"."UserPhone", "t1"."UserCom", "t1"."UserImg", "t1"."UserShop" FROM "users" AS "t1" WHERE ("t1"."UserImg" = ?) LIMIT ? OFFSET ?
Params: ['https://www.real-watch.ru/wa-data/public/shop/products/48/35/13548/images/15486/15486.600.jpg', 1, 0]
[Finished in 13.1s]


Не могу записать ссылку в ячейку просит выдает ошибку. Что не так?
  • Вопрос задан
  • 154 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы