umputun / tg-spam

Anti-Spam bot for Telegram and anti-spam library
https://tg-spam.umputun.dev
MIT License
211 stars 36 forks source link

unban failure #65

Closed kuhytitusdlz closed 7 months ago

kuhytitusdlz commented 7 months ago

Hi umputun,

I used docker-compose to deploy the application, and when I try to unban a user I get a warning

image

tg-spam | 2024/03/24 11:10:32.014 [WARN] failed to process callback: failed to unban user: failed to update ham for "Нужен человек для удаленного заработка. С вас, телефон и 2 часа свободного времени. Доход достойный. Для связи (+) в ЛС": can't update ham samples: can't update ham samples: failed to open /srv/data/ham-dynamic.txt: open /srv/data/ham-dynamic.txt: no such file or directory

kuhytitusdlz commented 7 months ago

*I don't see this file /srv/data/ham-dynamic.txt in the container

/srv $ ls -la ./data
total 244
drwxrwxr-x    2 app      app           4096 Mar 24 11:09 .
drwxr-xr-x    1 root     root          4096 Mar 24 11:07 ..
-rwxrwxr-x    1 app      app             58 Mar 24 07:20 .not_mounted
-rwxrwxr-x    1 app      app           2756 Mar 24 07:20 exclude-tokens.txt
-rwxrwxr-x    1 app      app          70848 Mar 24 07:20 ham-samples.txt
-rwxrwxr-x    1 app      app         103724 Mar 24 07:20 spam-samples.txt
-rwxrwxr-x    1 app      app            315 Mar 24 07:20 stop-words.txt
-rw-r--r--    1 app      app          45056 Mar 24 11:09 tg-spam.db
/srv $
umputun commented 7 months ago

i think you missed the part about mounting the samples directory, pls see readme

not a bug report but rather FAQ type of question, moved to discussions