pranit144 commited on
Commit
2bd8626
·
verified ·
1 Parent(s): c817028

Upload 10 files

Browse files
Files changed (10) hide show
  1. .env +4 -0
  2. app.py +0 -0
  3. bot.log +681 -0
  4. chat_log.json +184 -0
  5. data.json +201 -0
  6. data.json.backup +196 -0
  7. farmers.json +75 -0
  8. general_ai_responses.json +11 -0
  9. scheduled_messages.json +54 -0
  10. test_index.py +0 -0
.env ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ BOT_TOKEN="8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc"
2
+ CHAT_ID="5397241102"
3
+ GEMINI_API_KEY="AIzaSyBYU1pjQW_tSSC07FOjUVWoAx-JbGvbQGE"
4
+ BOT_TOKEN =8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc
app.py ADDED
The diff for this file is too large to render. See raw diff
 
bot.log ADDED
@@ -0,0 +1,681 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-09-09 21:45:44,367 - MainThread - ERROR - BOT_TOKEN environment variable is required!
2
+ 2025-09-09 21:58:01,780 - MainThread - ERROR - BOT_TOKEN environment variable is required!
3
+ 2025-09-09 21:58:39,645 - MainThread - INFO - Gemini model initialized successfully.
4
+ 2025-09-09 21:58:39,649 - PollingThread - INFO - Polling thread started.
5
+ 2025-09-09 21:58:39,650 - SchedulerThread - INFO - Scheduler thread started.
6
+ 2025-09-09 21:58:39,650 - MainThread - INFO - Background threads started successfully.
7
+ 2025-09-09 21:58:40,863 - MainThread - INFO - Bot connected: @KrishiBotmitrabot (Krishi Mitra)
8
+ 2025-09-09 21:58:40,886 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
9
+ * Running on all addresses (0.0.0.0)
10
+ * Running on http://127.0.0.1:5000
11
+ * Running on http://192.168.0.103:5000
12
+ 2025-09-09 21:58:40,887 - MainThread - INFO - Press CTRL+C to quit
13
+ 2025-09-09 21:58:43,063 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:43] "GET / HTTP/1.1" 200 -
14
+ 2025-09-09 21:58:43,068 - Thread-2 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:43] "GET / HTTP/1.1" 200 -
15
+ 2025-09-09 21:58:43,560 - Thread-3 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:43] "GET /get_messages HTTP/1.1" 200 -
16
+ 2025-09-09 21:58:43,562 - Thread-4 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:43] "GET /favicon.ico HTTP/1.1" 404 -
17
+ 2025-09-09 21:58:43,634 - Thread-5 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:43] "GET /get_messages HTTP/1.1" 200 -
18
+ 2025-09-09 21:58:46,459 - Thread-6 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:46] "GET /get_messages HTTP/1.1" 200 -
19
+ 2025-09-09 21:58:48,525 - Thread-7 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:48] "GET /get_messages HTTP/1.1" 200 -
20
+ 2025-09-09 21:58:48,650 - Thread-8 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:48] "GET /get_messages HTTP/1.1" 200 -
21
+ 2025-09-09 21:58:53,520 - Thread-9 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:53] "GET /get_messages HTTP/1.1" 200 -
22
+ 2025-09-09 21:58:53,645 - Thread-10 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:53] "GET /get_messages HTTP/1.1" 200 -
23
+ 2025-09-09 21:58:58,522 - Thread-11 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:58] "GET /get_messages HTTP/1.1" 200 -
24
+ 2025-09-09 21:58:58,649 - Thread-12 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:58:58] "GET /get_messages HTTP/1.1" 200 -
25
+ 2025-09-09 21:59:03,530 - Thread-13 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:03] "GET /get_messages HTTP/1.1" 200 -
26
+ 2025-09-09 21:59:03,640 - Thread-14 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:03] "GET /get_messages HTTP/1.1" 200 -
27
+ 2025-09-09 21:59:07,752 - Thread-15 (process_request_thread) - INFO - Schedule added: 'send me test' at 21:00
28
+ 2025-09-09 21:59:07,754 - Thread-15 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:07] "POST /schedule HTTP/1.1" 302 -
29
+ 2025-09-09 21:59:07,786 - Thread-16 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:07] "GET / HTTP/1.1" 200 -
30
+ 2025-09-09 21:59:07,889 - Thread-17 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:07] "GET /get_messages HTTP/1.1" 200 -
31
+ 2025-09-09 21:59:08,647 - Thread-18 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:08] "GET /get_messages HTTP/1.1" 200 -
32
+ 2025-09-09 21:59:12,897 - Thread-19 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:12] "GET /get_messages HTTP/1.1" 200 -
33
+ 2025-09-09 21:59:13,665 - Thread-20 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:13] "GET /get_messages HTTP/1.1" 200 -
34
+ 2025-09-09 21:59:17,933 - Thread-21 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:17] "GET /get_messages HTTP/1.1" 200 -
35
+ 2025-09-09 21:59:18,671 - Thread-22 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:18] "GET /get_messages HTTP/1.1" 200 -
36
+ 2025-09-09 21:59:22,888 - Thread-23 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:22] "GET /get_messages HTTP/1.1" 200 -
37
+ 2025-09-09 21:59:23,653 - Thread-24 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:23] "GET /get_messages HTTP/1.1" 200 -
38
+ 2025-09-09 21:59:27,890 - Thread-25 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:27] "GET /get_messages HTTP/1.1" 200 -
39
+ 2025-09-09 21:59:28,639 - Thread-26 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:28] "GET /get_messages HTTP/1.1" 200 -
40
+ 2025-09-09 21:59:32,888 - Thread-27 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:32] "GET /get_messages HTTP/1.1" 200 -
41
+ 2025-09-09 21:59:33,643 - Thread-28 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:33] "GET /get_messages HTTP/1.1" 200 -
42
+ 2025-09-09 21:59:37,893 - Thread-29 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:37] "GET /get_messages HTTP/1.1" 200 -
43
+ 2025-09-09 21:59:38,641 - Thread-30 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:38] "GET /get_messages HTTP/1.1" 200 -
44
+ 2025-09-09 21:59:42,898 - Thread-31 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:42] "GET /get_messages HTTP/1.1" 200 -
45
+ 2025-09-09 21:59:43,647 - Thread-32 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:43] "GET /get_messages HTTP/1.1" 200 -
46
+ 2025-09-09 21:59:46,430 - Thread-33 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:46] "GET /get_messages HTTP/1.1" 200 -
47
+ 2025-09-09 21:59:47,903 - Thread-34 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:47] "GET /get_messages HTTP/1.1" 200 -
48
+ 2025-09-09 21:59:48,636 - Thread-35 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:48] "GET /get_messages HTTP/1.1" 200 -
49
+ 2025-09-09 21:59:52,892 - Thread-36 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:52] "GET /get_messages HTTP/1.1" 200 -
50
+ 2025-09-09 21:59:53,642 - Thread-37 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:53] "GET /get_messages HTTP/1.1" 200 -
51
+ 2025-09-09 21:59:57,890 - Thread-38 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:57] "GET /get_messages HTTP/1.1" 200 -
52
+ 2025-09-09 21:59:58,637 - Thread-39 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 21:59:58] "GET /get_messages HTTP/1.1" 200 -
53
+ 2025-09-09 22:00:02,887 - Thread-40 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:02] "GET /get_messages HTTP/1.1" 200 -
54
+ 2025-09-09 22:00:03,642 - Thread-41 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:03] "GET /get_messages HTTP/1.1" 200 -
55
+ 2025-09-09 22:00:07,890 - Thread-42 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:07] "GET /get_messages HTTP/1.1" 200 -
56
+ 2025-09-09 22:00:08,640 - Thread-43 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:08] "GET /get_messages HTTP/1.1" 200 -
57
+ 2025-09-09 22:00:12,895 - Thread-44 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:12] "GET /get_messages HTTP/1.1" 200 -
58
+ 2025-09-09 22:00:13,648 - Thread-45 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:13] "GET /get_messages HTTP/1.1" 200 -
59
+ 2025-09-09 22:00:17,894 - Thread-46 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:17] "GET /get_messages HTTP/1.1" 200 -
60
+ 2025-09-09 22:00:18,643 - Thread-47 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:18] "GET /get_messages HTTP/1.1" 200 -
61
+ 2025-09-09 22:00:22,889 - Thread-48 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:22] "GET /get_messages HTTP/1.1" 200 -
62
+ 2025-09-09 22:00:23,649 - Thread-49 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:23] "GET /get_messages HTTP/1.1" 200 -
63
+ 2025-09-09 22:00:27,888 - Thread-50 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:27] "GET /get_messages HTTP/1.1" 200 -
64
+ 2025-09-09 22:00:28,639 - Thread-51 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:28] "GET /get_messages HTTP/1.1" 200 -
65
+ 2025-09-09 22:00:32,898 - Thread-52 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:32] "GET /get_messages HTTP/1.1" 200 -
66
+ 2025-09-09 22:00:33,646 - Thread-53 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:33] "GET /get_messages HTTP/1.1" 200 -
67
+ 2025-09-09 22:00:37,902 - Thread-54 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:37] "GET /get_messages HTTP/1.1" 200 -
68
+ 2025-09-09 22:00:38,636 - Thread-55 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:38] "GET /get_messages HTTP/1.1" 200 -
69
+ 2025-09-09 22:00:42,890 - Thread-56 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:42] "GET /get_messages HTTP/1.1" 200 -
70
+ 2025-09-09 22:00:43,640 - Thread-57 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:43] "GET /get_messages HTTP/1.1" 200 -
71
+ 2025-09-09 22:00:46,443 - Thread-58 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:46] "GET /get_messages HTTP/1.1" 200 -
72
+ 2025-09-09 22:00:47,887 - Thread-59 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:47] "GET /get_messages HTTP/1.1" 200 -
73
+ 2025-09-09 22:00:48,643 - Thread-60 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:48] "GET /get_messages HTTP/1.1" 200 -
74
+ 2025-09-09 22:00:52,887 - Thread-61 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:52] "GET /get_messages HTTP/1.1" 200 -
75
+ 2025-09-09 22:00:53,642 - Thread-62 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:53] "GET /get_messages HTTP/1.1" 200 -
76
+ 2025-09-09 22:00:57,887 - Thread-63 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:57] "GET /get_messages HTTP/1.1" 200 -
77
+ 2025-09-09 22:00:58,646 - Thread-64 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:00:58] "GET /get_messages HTTP/1.1" 200 -
78
+ 2025-09-09 22:01:02,899 - Thread-65 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:02] "GET /get_messages HTTP/1.1" 200 -
79
+ 2025-09-09 22:01:03,648 - Thread-66 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:03] "GET /get_messages HTTP/1.1" 200 -
80
+ 2025-09-09 22:01:07,895 - Thread-67 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:07] "GET /get_messages HTTP/1.1" 200 -
81
+ 2025-09-09 22:01:08,648 - Thread-68 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:08] "GET /get_messages HTTP/1.1" 200 -
82
+ 2025-09-09 22:01:10,163 - Thread-69 (process_request_thread) - INFO - Schedule added: 'send me test' at 23:01
83
+ 2025-09-09 22:01:10,164 - Thread-69 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:10] "POST /schedule HTTP/1.1" 302 -
84
+ 2025-09-09 22:01:10,190 - Thread-70 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:10] "GET / HTTP/1.1" 200 -
85
+ 2025-09-09 22:01:10,281 - Thread-71 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:10] "GET /get_messages HTTP/1.1" 200 -
86
+ 2025-09-09 22:01:13,659 - Thread-72 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:13] "GET /get_messages HTTP/1.1" 200 -
87
+ 2025-09-09 22:01:15,295 - Thread-73 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:15] "GET /get_messages HTTP/1.1" 200 -
88
+ 2025-09-09 22:01:18,645 - Thread-74 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:18] "GET /get_messages HTTP/1.1" 200 -
89
+ 2025-09-09 22:01:19,910 - Thread-75 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:19] "GET / HTTP/1.1" 200 -
90
+ 2025-09-09 22:01:19,995 - Thread-76 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:19] "GET /get_messages HTTP/1.1" 200 -
91
+ 2025-09-09 22:01:23,638 - Thread-77 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:23] "GET /get_messages HTTP/1.1" 200 -
92
+ 2025-09-09 22:01:24,997 - Thread-78 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:24] "GET /get_messages HTTP/1.1" 200 -
93
+ 2025-09-09 22:01:28,644 - Thread-79 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:28] "GET /get_messages HTTP/1.1" 200 -
94
+ 2025-09-09 22:01:33,646 - Thread-80 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:33] "GET /get_messages HTTP/1.1" 200 -
95
+ 2025-09-09 22:01:38,643 - Thread-81 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:38] "GET /get_messages HTTP/1.1" 200 -
96
+ 2025-09-09 22:01:43,644 - Thread-82 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:43] "GET /get_messages HTTP/1.1" 200 -
97
+ 2025-09-09 22:01:46,434 - Thread-83 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:46] "GET /get_messages HTTP/1.1" 200 -
98
+ 2025-09-09 22:01:48,636 - Thread-84 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:48] "GET /get_messages HTTP/1.1" 200 -
99
+ 2025-09-09 22:01:53,648 - Thread-85 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:53] "GET /get_messages HTTP/1.1" 200 -
100
+ 2025-09-09 22:01:58,638 - Thread-86 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:01:58] "GET /get_messages HTTP/1.1" 200 -
101
+ 2025-09-09 22:02:03,644 - Thread-87 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:03] "GET /get_messages HTTP/1.1" 200 -
102
+ 2025-09-09 22:02:08,649 - Thread-88 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:08] "GET /get_messages HTTP/1.1" 200 -
103
+ 2025-09-09 22:02:13,646 - Thread-89 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:13] "GET /get_messages HTTP/1.1" 200 -
104
+ 2025-09-09 22:02:18,637 - Thread-90 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:18] "GET /get_messages HTTP/1.1" 200 -
105
+ 2025-09-09 22:02:20,046 - Thread-91 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:20] "GET /get_messages HTTP/1.1" 200 -
106
+ 2025-09-09 22:02:21,258 - Thread-92 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:21] "GET /get_messages HTTP/1.1" 200 -
107
+ 2025-09-09 22:02:23,654 - Thread-93 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:23] "GET /get_messages HTTP/1.1" 200 -
108
+ 2025-09-09 22:02:23,970 - Thread-94 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:23] "GET /get_messages HTTP/1.1" 200 -
109
+ 2025-09-09 22:02:24,999 - Thread-95 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:24] "GET /get_messages HTTP/1.1" 200 -
110
+ 2025-09-09 22:02:26,438 - Thread-96 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:26] "GET /get_messages HTTP/1.1" 200 -
111
+ 2025-09-09 22:02:28,646 - Thread-97 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:28] "GET /get_messages HTTP/1.1" 200 -
112
+ 2025-09-09 22:02:31,441 - Thread-98 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:31] "GET /get_messages HTTP/1.1" 200 -
113
+ 2025-09-09 22:02:36,258 - Thread-99 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:02:36] "GET /get_messages HTTP/1.1" 200 -
114
+ 2025-09-09 22:17:28,841 - MainThread - INFO - Gemini model initialized successfully.
115
+ 2025-09-09 22:17:28,846 - PollingThread - INFO - Polling thread started.
116
+ 2025-09-09 22:17:28,846 - SchedulerThread - INFO - Scheduler thread started.
117
+ 2025-09-09 22:17:28,847 - MainThread - INFO - Background threads started successfully.
118
+ 2025-09-09 22:17:30,267 - MainThread - INFO - Bot connected: @KrishiBotmitrabot (Krishi Mitra)
119
+ 2025-09-09 22:17:30,333 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
120
+ * Running on all addresses (0.0.0.0)
121
+ * Running on http://127.0.0.1:5000
122
+ * Running on http://192.168.0.103:5000
123
+ 2025-09-09 22:17:30,334 - MainThread - INFO - Press CTRL+C to quit
124
+ 2025-09-09 22:17:32,449 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:32] "GET / HTTP/1.1" 200 -
125
+ 2025-09-09 22:17:32,836 - Thread-2 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:32] "GET /get_messages HTTP/1.1" 200 -
126
+ 2025-09-09 22:17:32,898 - Thread-3 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:32] "GET /favicon.ico HTTP/1.1" 404 -
127
+ 2025-09-09 22:17:37,839 - Thread-4 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:37] "GET /get_messages HTTP/1.1" 200 -
128
+ 2025-09-09 22:17:42,846 - Thread-5 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:42] "GET /get_messages HTTP/1.1" 200 -
129
+ 2025-09-09 22:17:44,572 - Thread-6 (process_request_thread) - INFO - Schedule added: 'send update regarding your farm' at 22:18
130
+ 2025-09-09 22:17:44,574 - Thread-6 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:44] "POST /schedule HTTP/1.1" 302 -
131
+ 2025-09-09 22:17:44,603 - Thread-7 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:44] "GET / HTTP/1.1" 200 -
132
+ 2025-09-09 22:17:44,703 - Thread-8 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:44] "GET /get_messages HTTP/1.1" 200 -
133
+ 2025-09-09 22:17:49,710 - Thread-9 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:49] "GET /get_messages HTTP/1.1" 200 -
134
+ 2025-09-09 22:17:54,716 - Thread-10 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:54] "GET /get_messages HTTP/1.1" 200 -
135
+ 2025-09-09 22:17:59,702 - Thread-11 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:17:59] "GET /get_messages HTTP/1.1" 200 -
136
+ 2025-09-09 22:18:00,857 - SchedulerThread - INFO - Sending scheduled message: 'send update regarding your farm' at 22:18
137
+ 2025-09-09 22:18:02,018 - SchedulerThread - INFO - Telegram message sent to chat_id 5397241102: 'send update regarding your farm...'
138
+ 2025-09-09 22:18:04,746 - Thread-12 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:04] "GET /get_messages HTTP/1.1" 200 -
139
+ 2025-09-09 22:18:09,701 - Thread-13 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:09] "GET /get_messages HTTP/1.1" 200 -
140
+ 2025-09-09 22:18:14,714 - Thread-14 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:14] "GET /get_messages HTTP/1.1" 200 -
141
+ 2025-09-09 22:18:19,706 - Thread-15 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:19] "GET /get_messages HTTP/1.1" 200 -
142
+ 2025-09-09 22:18:20,484 - PollingThread - INFO - Received message from Pranit Chilbule: 'I have financial issue in my personal life as students'
143
+ 2025-09-09 22:18:20,485 - PollingThread - INFO - Sending prompt to Gemini (attempt 1): 'I have financial issue in my personal life as students...'
144
+ 2025-09-09 22:18:23,728 - PollingThread - INFO - Received response from Gemini: 'Namaste! I understand you're facing financial challenges as a student. That can be tough. While I pr...'
145
+ 2025-09-09 22:18:24,703 - Thread-18 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:24] "GET /get_messages HTTP/1.1" 200 -
146
+ 2025-09-09 22:18:25,085 - PollingThread - INFO - Telegram message sent to chat_id 5397241102: 'Namaste! I understand you're facing financial challenges as a student. That can be tough. While I pr...'
147
+ 2025-09-09 22:18:29,729 - Thread-19 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:29] "GET /get_messages HTTP/1.1" 200 -
148
+ 2025-09-09 22:18:34,714 - Thread-20 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:18:34] "GET /get_messages HTTP/1.1" 200 -
149
+ 2025-09-09 22:22:12,745 - Thread-21 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:22:12] "GET /get_messages HTTP/1.1" 200 -
150
+ 2025-09-09 22:22:12,759 - Thread-22 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:22:12] "GET /get_messages HTTP/1.1" 200 -
151
+ 2025-09-09 22:22:14,701 - Thread-23 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:22:14] "GET /get_messages HTTP/1.1" 200 -
152
+ 2025-09-09 22:22:19,714 - Thread-24 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:22:19] "GET /get_messages HTTP/1.1" 200 -
153
+ 2025-09-09 22:22:24,704 - Thread-25 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:22:24] "GET /get_messages HTTP/1.1" 200 -
154
+ 2025-09-09 22:26:39,387 - MainThread - INFO - Received signal 2. Initiating shutdown...
155
+ 2025-09-09 22:26:39,389 - MainThread - INFO - Shutting down background threads...
156
+ 2025-09-09 22:26:39,391 - MainThread - INFO - Shutting down background threads...
157
+ 2025-09-09 22:26:45,589 - MainThread - INFO - Gemini model initialized successfully.
158
+ 2025-09-09 22:26:45,594 - PollingThread - INFO - Polling thread started.
159
+ 2025-09-09 22:26:45,599 - SchedulerThread - INFO - Scheduler thread started.
160
+ 2025-09-09 22:26:45,599 - MainThread - INFO - Background threads started successfully.
161
+ 2025-09-09 22:26:46,735 - MainThread - INFO - Bot connected: @KrishiBotmitrabot (Krishi Mitra)
162
+ 2025-09-09 22:26:46,769 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
163
+ * Running on all addresses (0.0.0.0)
164
+ * Running on http://127.0.0.1:5000
165
+ * Running on http://192.168.0.103:5000
166
+ 2025-09-09 22:26:46,769 - MainThread - INFO - Press CTRL+C to quit
167
+ 2025-09-09 22:26:47,010 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:26:47] "GET /get_messages HTTP/1.1" 200 -
168
+ 2025-09-09 22:26:49,028 - Thread-2 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:26:49] "GET / HTTP/1.1" 200 -
169
+ 2025-09-09 22:26:49,210 - Thread-3 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:26:49] "GET /get_messages HTTP/1.1" 200 -
170
+ 2025-09-09 22:26:54,222 - Thread-4 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:26:54] "GET /get_messages HTTP/1.1" 200 -
171
+ 2025-09-09 22:26:59,212 - Thread-5 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:26:59] "GET /get_messages HTTP/1.1" 200 -
172
+ 2025-09-09 22:27:05,469 - Thread-6 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:05] "POST /send_test_message HTTP/1.1" 302 -
173
+ 2025-09-09 22:27:05,492 - Thread-7 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:05] "GET / HTTP/1.1" 200 -
174
+ 2025-09-09 22:27:05,573 - Thread-8 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:05] "GET /get_messages HTTP/1.1" 200 -
175
+ 2025-09-09 22:27:10,558 - Thread-9 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:10] "GET /get_messages HTTP/1.1" 200 -
176
+ 2025-09-09 22:27:15,563 - Thread-10 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:15] "GET /get_messages HTTP/1.1" 200 -
177
+ 2025-09-09 22:27:20,305 - Thread-11 (process_request_thread) - INFO - Schedule added: 'send update regarding your farm' at 22:28
178
+ 2025-09-09 22:27:20,308 - Thread-11 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:20] "POST /schedule HTTP/1.1" 302 -
179
+ 2025-09-09 22:27:20,336 - Thread-12 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:20] "GET / HTTP/1.1" 200 -
180
+ 2025-09-09 22:27:20,419 - Thread-13 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:20] "GET /get_messages HTTP/1.1" 200 -
181
+ 2025-09-09 22:27:25,414 - Thread-14 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:25] "GET /get_messages HTTP/1.1" 200 -
182
+ 2025-09-09 22:27:30,413 - Thread-15 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:30] "GET /get_messages HTTP/1.1" 200 -
183
+ 2025-09-09 22:27:35,435 - Thread-16 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:27:35] "GET /get_messages HTTP/1.1" 200 -
184
+ 2025-09-09 22:28:00,634 - SchedulerThread - INFO - Sending scheduled message: 'send update regarding your farm' at 22:28
185
+ 2025-09-09 22:28:01,865 - SchedulerThread - INFO - Telegram message sent to chat_id 5397241102: 'send update regarding your farm...'
186
+ 2025-09-09 22:28:10,024 - Thread-17 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:10] "GET /get_messages HTTP/1.1" 200 -
187
+ 2025-09-09 22:28:10,414 - Thread-18 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:10] "GET /get_messages HTTP/1.1" 200 -
188
+ 2025-09-09 22:28:13,556 - Thread-19 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:13] "GET / HTTP/1.1" 200 -
189
+ 2025-09-09 22:28:13,646 - Thread-20 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:13] "GET /get_messages HTTP/1.1" 200 -
190
+ 2025-09-09 22:28:19,925 - Thread-21 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:19] "GET /get_messages HTTP/1.1" 200 -
191
+ 2025-09-09 22:28:49,449 - Thread-22 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:49] "GET /get_messages HTTP/1.1" 200 -
192
+ 2025-09-09 22:28:49,454 - Thread-23 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:28:49] "GET /get_messages HTTP/1.1" 200 -
193
+ 2025-09-09 22:28:54,535 - MainThread - INFO - Received signal 2. Initiating shutdown...
194
+ 2025-09-09 22:28:54,537 - MainThread - INFO - Shutting down background threads...
195
+ 2025-09-09 22:28:54,540 - MainThread - INFO - Shutting down background threads...
196
+ 2025-09-09 22:28:57,808 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
197
+ 2025-09-09 22:28:57,811 - MainThread - INFO - Starting background threads...
198
+ 2025-09-09 22:28:57,813 - PollingThread - INFO - Polling thread started.
199
+ 2025-09-09 22:28:57,814 - SchedulerThread - INFO - Scheduler thread started.
200
+ 2025-09-09 22:28:57,814 - MainThread - INFO - Background threads started successfully.
201
+ 2025-09-09 22:28:58,927 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
202
+ 2025-09-09 22:28:58,927 - MainThread - INFO - Starting Flask application...
203
+ 2025-09-09 22:28:58,978 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
204
+ * Running on all addresses (0.0.0.0)
205
+ * Running on http://127.0.0.1:5000
206
+ * Running on http://192.168.0.103:5000
207
+ 2025-09-09 22:28:58,979 - MainThread - INFO - Press CTRL+C to quit
208
+ 2025-09-09 22:29:02,857 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:02] "GET / HTTP/1.1" 200 -
209
+ 2025-09-09 22:29:03,264 - Thread-2 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:03] "GET /get_messages HTTP/1.1" 200 -
210
+ 2025-09-09 22:29:08,265 - Thread-3 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:08] "GET /get_messages HTTP/1.1" 200 -
211
+ 2025-09-09 22:29:13,279 - Thread-4 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:13] "GET /get_messages HTTP/1.1" 200 -
212
+ 2025-09-09 22:29:14,589 - Thread-5 (process_request_thread) - INFO - New global schedule added: 'send update regarding your farm...' at 22:30
213
+ 2025-09-09 22:29:14,591 - Thread-5 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:14] "POST /schedule HTTP/1.1" 302 -
214
+ 2025-09-09 22:29:14,616 - Thread-6 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:14] "GET / HTTP/1.1" 200 -
215
+ 2025-09-09 22:29:14,708 - Thread-7 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:14] "GET /get_messages HTTP/1.1" 200 -
216
+ 2025-09-09 22:29:19,721 - Thread-8 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:19] "GET /get_messages HTTP/1.1" 200 -
217
+ 2025-09-09 22:29:24,718 - Thread-9 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:24] "GET /get_messages HTTP/1.1" 200 -
218
+ 2025-09-09 22:29:29,710 - Thread-10 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:29] "GET /get_messages HTTP/1.1" 200 -
219
+ 2025-09-09 22:29:34,717 - Thread-11 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:34] "GET /get_messages HTTP/1.1" 200 -
220
+ 2025-09-09 22:29:39,710 - Thread-12 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:39] "GET /get_messages HTTP/1.1" 200 -
221
+ 2025-09-09 22:29:44,721 - Thread-13 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:44] "GET /get_messages HTTP/1.1" 200 -
222
+ 2025-09-09 22:29:49,722 - Thread-14 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:49] "GET /get_messages HTTP/1.1" 200 -
223
+ 2025-09-09 22:29:54,721 - Thread-15 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:54] "GET /get_messages HTTP/1.1" 200 -
224
+ 2025-09-09 22:29:59,718 - Thread-16 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:29:59] "GET /get_messages HTTP/1.1" 200 -
225
+ 2025-09-09 22:30:00,851 - SchedulerThread - INFO - Scheduler: Sending global scheduled message: 'send update regarding your farm' at 22:30
226
+ 2025-09-09 22:30:02,123 - SchedulerThread - INFO - Telegram message sent to chat_id 5397241102: 'send update regarding your farm...'
227
+ 2025-09-09 22:30:04,731 - Thread-17 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:04] "GET /get_messages HTTP/1.1" 200 -
228
+ 2025-09-09 22:30:09,709 - Thread-18 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:09] "GET /get_messages HTTP/1.1" 200 -
229
+ 2025-09-09 22:30:14,717 - Thread-19 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:14] "GET /get_messages HTTP/1.1" 200 -
230
+ 2025-09-09 22:30:19,714 - Thread-20 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:19] "GET /get_messages HTTP/1.1" 200 -
231
+ 2025-09-09 22:30:24,711 - Thread-21 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:24] "GET /get_messages HTTP/1.1" 200 -
232
+ 2025-09-09 22:30:29,660 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Updates are rice seed sown today and watered the field'
233
+ 2025-09-09 22:30:29,661 - PollingThread - ERROR - General polling error:
234
+ Traceback (most recent call last):
235
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 426, in poll_updates
236
+ if str(farmer["telegram_chat_id"]) == str(reply_to_chat_id):
237
+ KeyError: 'telegram_chat_id'
238
+ 2025-09-09 22:30:29,710 - Thread-22 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:29] "GET /get_messages HTTP/1.1" 200 -
239
+ 2025-09-09 22:30:34,720 - Thread-23 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:34] "GET /get_messages HTTP/1.1" 200 -
240
+ 2025-09-09 22:30:39,717 - Thread-24 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:30:39] "GET /get_messages HTTP/1.1" 200 -
241
+ 2025-09-09 22:31:09,881 - Thread-25 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:31:09] "GET /get_messages HTTP/1.1" 200 -
242
+ 2025-09-09 22:31:09,890 - Thread-26 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:31:09] "GET /get_messages HTTP/1.1" 200 -
243
+ 2025-09-09 22:31:13,164 - Thread-27 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:31:13] "GET / HTTP/1.1" 200 -
244
+ 2025-09-09 22:31:13,419 - Thread-28 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:31:13] "GET /get_messages HTTP/1.1" 200 -
245
+ 2025-09-09 22:31:18,422 - Thread-29 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:31:18] "GET /get_messages HTTP/1.1" 200 -
246
+ 2025-09-09 22:32:27,281 - MainThread - INFO - Received signal 2. Initiating shutdown...
247
+ 2025-09-09 22:32:27,282 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
248
+ 2025-09-09 22:38:41,374 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
249
+ 2025-09-09 22:38:41,377 - MainThread - INFO - Starting background threads...
250
+ 2025-09-09 22:38:41,378 - PollingThread - INFO - Polling thread started.
251
+ 2025-09-09 22:38:41,378 - SchedulerThread - INFO - Scheduler thread started.
252
+ 2025-09-09 22:38:41,379 - MainThread - INFO - Background threads started successfully.
253
+ 2025-09-09 22:38:41,379 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
254
+ 2025-09-09 22:38:42,339 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
255
+ 2025-09-09 22:38:42,340 - MainThread - INFO - Starting Flask application...
256
+ 2025-09-09 22:38:42,361 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
257
+ * Running on all addresses (0.0.0.0)
258
+ * Running on http://127.0.0.1:5000
259
+ * Running on http://192.168.0.103:5000
260
+ 2025-09-09 22:38:42,361 - MainThread - INFO - Press CTRL+C to quit
261
+ 2025-09-09 22:38:44,333 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:38:44] "GET / HTTP/1.1" 200 -
262
+ 2025-09-09 22:38:44,669 - Thread-2 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:38:44] "GET /get_messages HTTP/1.1" 200 -
263
+ 2025-09-09 22:38:49,678 - Thread-3 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:38:49] "GET /get_messages HTTP/1.1" 200 -
264
+ 2025-09-09 22:38:54,687 - Thread-4 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:38:54] "GET /get_messages HTTP/1.1" 200 -
265
+ 2025-09-09 22:38:59,672 - Thread-5 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:38:59] "GET /get_messages HTTP/1.1" 200 -
266
+ 2025-09-09 22:39:04,673 - Thread-6 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:39:04] "GET /get_messages HTTP/1.1" 200 -
267
+ 2025-09-09 22:39:09,683 - Thread-7 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:39:09] "GET /get_messages HTTP/1.1" 200 -
268
+ 2025-09-09 22:39:14,674 - Thread-8 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:39:14] "GET /get_messages HTTP/1.1" 200 -
269
+ 2025-09-09 22:39:15,827 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Updates are rice seed sown today and watered the field'
270
+ 2025-09-09 22:39:15,829 - PollingThread - INFO - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
271
+ 2025-09-09 22:39:15,830 - Thread-9 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 1): 'Updates are rice seed sown today and watered the field...'
272
+ 2025-09-09 22:39:15,836 - Thread-9 (process_general_message_and_respond) - WARNING - Attempt 1 - Gemini API error for general prompt: 'dangerous_content'
273
+ 2025-09-09 22:39:16,854 - Thread-9 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 2): 'Updates are rice seed sown today and watered the field...'
274
+ 2025-09-09 22:39:16,857 - Thread-9 (process_general_message_and_respond) - WARNING - Attempt 2 - Gemini API error for general prompt: 'dangerous_content'
275
+ 2025-09-09 22:39:18,871 - Thread-9 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 3): 'Updates are rice seed sown today and watered the field...'
276
+ 2025-09-09 22:39:18,872 - Thread-9 (process_general_message_and_respond) - WARNING - Attempt 3 - Gemini API error for general prompt: 'dangerous_content'
277
+ 2025-09-09 22:39:18,873 - Thread-9 (process_general_message_and_respond) - ERROR - Failed to get Gemini general response after 3 attempts.
278
+ 2025-09-09 22:39:19,698 - Thread-10 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:39:19] "GET /get_messages HTTP/1.1" 200 -
279
+ 2025-09-09 22:39:21,060 - Thread-9 (process_general_message_and_respond) - INFO - Telegram message sent to chat_id 5397241102: 'I apologize, but I'm having trouble processing your request right now. Please try again later....'
280
+ 2025-09-09 22:40:28,232 - MainThread - INFO - Received signal 2. Initiating shutdown...
281
+ 2025-09-09 22:40:28,233 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
282
+ 2025-09-09 22:42:42,943 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
283
+ 2025-09-09 22:42:42,945 - MainThread - INFO - Starting background threads...
284
+ 2025-09-09 22:42:42,946 - PollingThread - INFO - Polling thread started.
285
+ 2025-09-09 22:42:42,947 - SchedulerThread - INFO - Scheduler thread started.
286
+ 2025-09-09 22:42:42,947 - MainThread - INFO - Background threads started successfully.
287
+ 2025-09-09 22:42:42,947 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
288
+ 2025-09-09 22:42:43,875 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
289
+ 2025-09-09 22:42:43,877 - MainThread - INFO - Starting Flask application...
290
+ 2025-09-09 22:42:43,906 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
291
+ * Running on all addresses (0.0.0.0)
292
+ * Running on http://127.0.0.1:5000
293
+ * Running on http://192.168.0.103:5000
294
+ 2025-09-09 22:42:43,906 - MainThread - INFO - Press CTRL+C to quit
295
+ 2025-09-09 22:42:45,688 - Thread-1 (process_request_thread) - ERROR - Error in index route:
296
+ Traceback (most recent call last):
297
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 676, in index
298
+ return render_template("index.html",
299
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
300
+ return _render(app, template, context)
301
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
302
+ rv = template.render(context)
303
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
304
+ self.environment.handle_exception()
305
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
306
+ raise rewrite_traceback_stack(source=source)
307
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
308
+ {{ msg.text | safe }}
309
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
310
+ return getattr(obj, attribute)
311
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
312
+ 2025-09-09 22:42:45,691 - Thread-1 (process_request_thread) - ERROR - Exception on / [GET]
313
+ Traceback (most recent call last):
314
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 676, in index
315
+ return render_template("index.html",
316
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
317
+ return _render(app, template, context)
318
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
319
+ rv = template.render(context)
320
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
321
+ self.environment.handle_exception()
322
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
323
+ raise rewrite_traceback_stack(source=source)
324
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
325
+ {{ msg.text | safe }}
326
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
327
+ return getattr(obj, attribute)
328
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
329
+
330
+ During handling of the above exception, another exception occurred:
331
+
332
+ Traceback (most recent call last):
333
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 1511, in wsgi_app
334
+ response = self.full_dispatch_request()
335
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 919, in full_dispatch_request
336
+ rv = self.handle_user_exception(e)
337
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 917, in full_dispatch_request
338
+ rv = self.dispatch_request()
339
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 902, in dispatch_request
340
+ return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
341
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 684, in index
342
+ return render_template("index.html", messages=[], schedules=[], farmers=[], CHAT_ID="")
343
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
344
+ return _render(app, template, context)
345
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
346
+ rv = template.render(context)
347
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
348
+ self.environment.handle_exception()
349
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
350
+ raise rewrite_traceback_stack(source=source)
351
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
352
+ {{ msg.text | safe }}
353
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
354
+ return getattr(obj, attribute)
355
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
356
+ 2025-09-09 22:42:45,695 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:42:45] "GET / HTTP/1.1" 500 -
357
+ 2025-09-09 22:43:05,538 - MainThread - INFO - Received signal 2. Initiating shutdown...
358
+ 2025-09-09 22:43:05,540 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
359
+ 2025-09-09 22:43:11,292 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
360
+ 2025-09-09 22:43:11,293 - MainThread - INFO - Starting background threads...
361
+ 2025-09-09 22:43:11,295 - PollingThread - INFO - Polling thread started.
362
+ 2025-09-09 22:43:11,295 - SchedulerThread - INFO - Scheduler thread started.
363
+ 2025-09-09 22:43:11,295 - MainThread - INFO - Background threads started successfully.
364
+ 2025-09-09 22:43:11,296 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
365
+ 2025-09-09 22:43:12,208 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
366
+ 2025-09-09 22:43:12,209 - MainThread - INFO - Starting Flask application...
367
+ 2025-09-09 22:43:12,240 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
368
+ * Running on all addresses (0.0.0.0)
369
+ * Running on http://127.0.0.1:5000
370
+ * Running on http://192.168.0.103:5000
371
+ 2025-09-09 22:43:12,241 - MainThread - INFO - Press CTRL+C to quit
372
+ 2025-09-09 22:43:15,262 - Thread-1 (process_request_thread) - ERROR - Error in index route:
373
+ Traceback (most recent call last):
374
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 676, in index
375
+ return render_template("index.html",
376
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
377
+ return _render(app, template, context)
378
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
379
+ rv = template.render(context)
380
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
381
+ self.environment.handle_exception()
382
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
383
+ raise rewrite_traceback_stack(source=source)
384
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
385
+ {{ msg.text | safe }}
386
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
387
+ return getattr(obj, attribute)
388
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
389
+ 2025-09-09 22:43:15,264 - Thread-1 (process_request_thread) - ERROR - Exception on / [GET]
390
+ Traceback (most recent call last):
391
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 676, in index
392
+ return render_template("index.html",
393
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
394
+ return _render(app, template, context)
395
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
396
+ rv = template.render(context)
397
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
398
+ self.environment.handle_exception()
399
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
400
+ raise rewrite_traceback_stack(source=source)
401
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
402
+ {{ msg.text | safe }}
403
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
404
+ return getattr(obj, attribute)
405
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
406
+
407
+ During handling of the above exception, another exception occurred:
408
+
409
+ Traceback (most recent call last):
410
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 1511, in wsgi_app
411
+ response = self.full_dispatch_request()
412
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 919, in full_dispatch_request
413
+ rv = self.handle_user_exception(e)
414
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 917, in full_dispatch_request
415
+ rv = self.dispatch_request()
416
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\app.py", line 902, in dispatch_request
417
+ return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
418
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\app.py", line 684, in index
419
+ return render_template("index.html", messages=[], schedules=[], farmers=[], CHAT_ID="")
420
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 150, in render_template
421
+ return _render(app, template, context)
422
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\flask\templating.py", line 131, in _render
423
+ rv = template.render(context)
424
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 1295, in render
425
+ self.environment.handle_exception()
426
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 942, in handle_exception
427
+ raise rewrite_traceback_stack(source=source)
428
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\templates\index.html", line 727, in top-level template code
429
+ {{ msg.text | safe }}
430
+ File "C:\Users\prani\PycharmProjects\PythonProject67(SIHSTART)\.venv\lib\site-packages\jinja2\environment.py", line 490, in getattr
431
+ return getattr(obj, attribute)
432
+ jinja2.exceptions.UndefinedError: 'msg' is undefined
433
+ 2025-09-09 22:43:15,266 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:43:15] "GET / HTTP/1.1" 500 -
434
+ 2025-09-09 22:44:45,121 - MainThread - INFO - Received signal 2. Initiating shutdown...
435
+ 2025-09-09 22:44:45,126 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
436
+ 2025-09-09 22:44:47,036 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
437
+ 2025-09-09 22:44:47,039 - MainThread - INFO - Starting background threads...
438
+ 2025-09-09 22:44:47,040 - PollingThread - INFO - Polling thread started.
439
+ 2025-09-09 22:44:47,041 - SchedulerThread - INFO - Scheduler thread started.
440
+ 2025-09-09 22:44:47,041 - MainThread - INFO - Background threads started successfully.
441
+ 2025-09-09 22:44:47,041 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
442
+ 2025-09-09 22:44:47,959 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
443
+ 2025-09-09 22:44:47,960 - MainThread - INFO - Starting Flask application...
444
+ 2025-09-09 22:44:47,987 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
445
+ * Running on all addresses (0.0.0.0)
446
+ * Running on http://127.0.0.1:5000
447
+ * Running on http://192.168.0.103:5000
448
+ 2025-09-09 22:44:47,987 - MainThread - INFO - Press CTRL+C to quit
449
+ 2025-09-09 22:44:49,983 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:44:49] "GET / HTTP/1.1" 200 -
450
+ 2025-09-09 22:45:03,116 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Updates are rice seed sown today and watered the field'
451
+ 2025-09-09 22:45:03,117 - PollingThread - INFO - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
452
+ 2025-09-09 22:45:03,119 - Thread-3 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 1): 'Updates are rice seed sown today and watered the field...'
453
+ 2025-09-09 22:45:03,123 - Thread-3 (process_general_message_and_respond) - WARNING - Attempt 1 - Gemini API error for general prompt: 'dangerous_content'
454
+ 2025-09-09 22:45:04,135 - Thread-3 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 2): 'Updates are rice seed sown today and watered the field...'
455
+ 2025-09-09 22:45:04,135 - Thread-3 (process_general_message_and_respond) - WARNING - Attempt 2 - Gemini API error for general prompt: 'dangerous_content'
456
+ 2025-09-09 22:45:06,141 - Thread-3 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 3): 'Updates are rice seed sown today and watered the field...'
457
+ 2025-09-09 22:45:06,142 - Thread-3 (process_general_message_and_respond) - WARNING - Attempt 3 - Gemini API error for general prompt: 'dangerous_content'
458
+ 2025-09-09 22:45:06,142 - Thread-3 (process_general_message_and_respond) - ERROR - Failed to get Gemini general response after 3 attempts.
459
+ 2025-09-09 22:45:07,317 - Thread-3 (process_general_message_and_respond) - INFO - Telegram message sent to chat_id 5397241102: 'I apologize, but I'm having trouble processing your request right now. Please try again later....'
460
+ 2025-09-09 22:47:15,256 - MainThread - INFO - Received signal 2. Initiating shutdown...
461
+ 2025-09-09 22:47:15,257 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
462
+ 2025-09-09 22:47:17,695 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
463
+ 2025-09-09 22:47:17,699 - MainThread - INFO - Starting background threads...
464
+ 2025-09-09 22:47:17,713 - PollingThread - INFO - Polling thread started.
465
+ 2025-09-09 22:47:17,717 - SchedulerThread - INFO - Scheduler thread started.
466
+ 2025-09-09 22:47:17,718 - MainThread - INFO - Background threads started successfully.
467
+ 2025-09-09 22:47:17,720 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
468
+ 2025-09-09 22:47:18,638 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
469
+ 2025-09-09 22:47:18,639 - MainThread - INFO - Starting Flask application...
470
+ 2025-09-09 22:47:18,642 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Field is irrigated and rice seed are sown'
471
+ 2025-09-09 22:47:18,642 - PollingThread - INFO - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
472
+ 2025-09-09 22:47:18,643 - Thread-1 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 1): 'Field is irrigated and rice seed are sown...'
473
+ 2025-09-09 22:47:18,645 - Thread-1 (process_general_message_and_respond) - WARNING - Attempt 1 - Gemini API error for general prompt: 'dangerous_content'
474
+ 2025-09-09 22:47:18,676 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
475
+ * Running on all addresses (0.0.0.0)
476
+ * Running on http://127.0.0.1:5000
477
+ * Running on http://192.168.0.103:5000
478
+ 2025-09-09 22:47:18,677 - MainThread - INFO - Press CTRL+C to quit
479
+ 2025-09-09 22:47:19,663 - Thread-1 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 2): 'Field is irrigated and rice seed are sown...'
480
+ 2025-09-09 22:47:19,665 - Thread-1 (process_general_message_and_respond) - WARNING - Attempt 2 - Gemini API error for general prompt: 'dangerous_content'
481
+ 2025-09-09 22:47:21,676 - Thread-1 (process_general_message_and_respond) - INFO - Sending general prompt to Gemini (attempt 3): 'Field is irrigated and rice seed are sown...'
482
+ 2025-09-09 22:47:21,678 - Thread-1 (process_general_message_and_respond) - WARNING - Attempt 3 - Gemini API error for general prompt: 'dangerous_content'
483
+ 2025-09-09 22:47:21,679 - Thread-1 (process_general_message_and_respond) - ERROR - Failed to get Gemini general response after 3 attempts.
484
+ 2025-09-09 22:47:22,737 - Thread-1 (process_general_message_and_respond) - INFO - Telegram message sent to chat_id 5397241102: 'I apologize, but I'm having trouble processing your request right now. Please try again later....'
485
+ 2025-09-09 22:51:45,228 - MainThread - INFO - Received signal 2. Initiating shutdown...
486
+ 2025-09-09 22:51:45,229 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
487
+ 2025-09-09 22:51:47,613 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
488
+ 2025-09-09 22:51:47,617 - MainThread - INFO - Starting background threads...
489
+ 2025-09-09 22:51:47,618 - PollingThread - INFO - Polling thread started.
490
+ 2025-09-09 22:51:47,619 - SchedulerThread - INFO - Scheduler thread started.
491
+ 2025-09-09 22:51:47,619 - PollingThread - DEBUG - Polling Telegram for updates (offset: 1, timeout: 30s)...
492
+ 2025-09-09 22:51:47,619 - MainThread - INFO - Background threads started successfully.
493
+ 2025-09-09 22:51:47,619 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
494
+ 2025-09-09 22:51:47,630 - MainThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
495
+ 2025-09-09 22:51:47,631 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
496
+ 2025-09-09 22:51:47,646 - SchedulerThread - DEBUG - Scheduler sleeping for 13 seconds until next minute check (current second: 47)...
497
+ 2025-09-09 22:51:48,602 - MainThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getMe HTTP/1.1" 200 259
498
+ 2025-09-09 22:51:48,604 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
499
+ 2025-09-09 22:51:48,605 - MainThread - INFO - Starting Flask application...
500
+ 2025-09-09 22:51:48,629 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
501
+ * Running on all addresses (0.0.0.0)
502
+ * Running on http://127.0.0.1:5000
503
+ * Running on http://192.168.0.103:5000
504
+ 2025-09-09 22:51:48,630 - MainThread - INFO - Press CTRL+C to quit
505
+ 2025-09-09 22:51:54,025 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=1&timeout=30&allowed_updates=message HTTP/1.1" 200 337
506
+ 2025-09-09 22:51:54,026 - PollingThread - DEBUG - Received 1 new updates.
507
+ 2025-09-09 22:51:54,027 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Field is irrigated and rice seed are sown'
508
+ 2025-09-09 22:51:54,028 - PollingThread - DEBUG - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
509
+ 2025-09-09 22:51:54,028 - PollingThread - DEBUG - Checking farmer Unknown: last_req_date=, last_rec_date=, today=2025-09-09
510
+ 2025-09-09 22:51:54,029 - PollingThread - DEBUG - No specific farmer found awaiting a *new* update today for message: 'Field is irrigated and rice seed are sown'
511
+ 2025-09-09 22:51:54,030 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Sending general prompt to Gemini (attempt 1): 'Field is irrigated and rice seed are sown...'
512
+ 2025-09-09 22:51:54,031 - Thread-1 (process_general_message_and_respond_in_thread) - WARNING - Attempt 1 - Gemini API error for general prompt: 'dangerous_content'
513
+ 2025-09-09 22:51:54,033 - PollingThread - DEBUG - Created backup of data.json at data.json.backup
514
+ 2025-09-09 22:51:54,035 - PollingThread - DEBUG - Data successfully saved to data.json
515
+ 2025-09-09 22:51:54,035 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
516
+ 2025-09-09 22:51:54,038 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
517
+ 2025-09-09 22:51:55,034 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Sending general prompt to Gemini (attempt 2): 'Field is irrigated and rice seed are sown...'
518
+ 2025-09-09 22:51:55,036 - Thread-1 (process_general_message_and_respond_in_thread) - WARNING - Attempt 2 - Gemini API error for general prompt: 'dangerous_content'
519
+ 2025-09-09 22:51:57,051 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Sending general prompt to Gemini (attempt 3): 'Field is irrigated and rice seed are sown...'
520
+ 2025-09-09 22:51:57,054 - Thread-1 (process_general_message_and_respond_in_thread) - WARNING - Attempt 3 - Gemini API error for general prompt: 'dangerous_content'
521
+ 2025-09-09 22:51:57,055 - Thread-1 (process_general_message_and_respond_in_thread) - ERROR - Gemini safety filter blocked content: 'Field is irrigated and rice seed are sown...'
522
+ 2025-09-09 22:51:57,055 - Thread-1 (process_general_message_and_respond_in_thread) - ERROR - Full Gemini safety error details: 'dangerous_content'
523
+ 2025-09-09 22:51:57,056 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - Attempt 1: Sending Telegram message to 5397241102 - 'I apologize, but I cannot process that request due...'
524
+ 2025-09-09 22:51:57,059 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
525
+ 2025-09-09 22:51:58,138 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - https://api.telegram.org:443 "POST /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/sendMessage HTTP/1.1" 200 359
526
+ 2025-09-09 22:51:58,139 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Telegram message sent to chat_id 5397241102: 'I apologize, but I cannot process that request due to content safety policies. Please try a differen...'
527
+ 2025-09-09 22:52:25,540 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199373&timeout=30&allowed_updates=message HTTP/1.1" 200 23
528
+ 2025-09-09 22:52:25,543 - PollingThread - DEBUG - Received 0 new updates.
529
+ 2025-09-09 22:52:25,544 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
530
+ 2025-09-09 22:52:25,547 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
531
+ 2025-09-09 22:52:56,476 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199373&timeout=30&allowed_updates=message HTTP/1.1" 200 23
532
+ 2025-09-09 22:52:56,480 - PollingThread - DEBUG - Received 0 new updates.
533
+ 2025-09-09 22:52:56,481 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
534
+ 2025-09-09 22:52:56,486 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
535
+ 2025-09-09 22:53:27,374 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199373&timeout=30&allowed_updates=message HTTP/1.1" 200 23
536
+ 2025-09-09 22:53:27,377 - PollingThread - DEBUG - Received 0 new updates.
537
+ 2025-09-09 22:53:27,377 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
538
+ 2025-09-09 22:53:27,380 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
539
+ 2025-09-09 22:53:58,346 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199373&timeout=30&allowed_updates=message HTTP/1.1" 200 23
540
+ 2025-09-09 22:53:58,349 - PollingThread - DEBUG - Received 0 new updates.
541
+ 2025-09-09 22:53:58,351 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
542
+ 2025-09-09 22:53:58,354 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
543
+ 2025-09-09 22:54:29,238 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199373&timeout=30&allowed_updates=message HTTP/1.1" 200 23
544
+ 2025-09-09 22:54:29,242 - PollingThread - DEBUG - Received 0 new updates.
545
+ 2025-09-09 22:54:29,242 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199373, timeout: 30s)...
546
+ 2025-09-09 22:54:29,246 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
547
+ 2025-09-09 22:54:31,126 - MainThread - INFO - Received signal 2. Initiating shutdown...
548
+ 2025-09-09 22:54:31,127 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
549
+ 2025-09-09 22:55:10,919 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
550
+ 2025-09-09 22:55:10,922 - MainThread - INFO - Starting background threads...
551
+ 2025-09-09 22:55:10,923 - PollingThread - INFO - Polling thread started.
552
+ 2025-09-09 22:55:10,924 - SchedulerThread - INFO - Scheduler thread started.
553
+ 2025-09-09 22:55:10,924 - MainThread - INFO - Background threads started successfully.
554
+ 2025-09-09 22:55:10,924 - PollingThread - DEBUG - Polling Telegram for updates (offset: 1, timeout: 30s)...
555
+ 2025-09-09 22:55:10,924 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
556
+ 2025-09-09 22:55:10,931 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
557
+ 2025-09-09 22:55:10,932 - MainThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
558
+ 2025-09-09 22:55:10,944 - SchedulerThread - DEBUG - Scheduler sleeping for 50 seconds until next minute check (current second: 10)...
559
+ 2025-09-09 22:55:12,006 - MainThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getMe HTTP/1.1" 200 259
560
+ 2025-09-09 22:55:12,007 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
561
+ 2025-09-09 22:55:12,008 - MainThread - INFO - Starting Flask application...
562
+ 2025-09-09 22:55:12,038 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
563
+ * Running on all addresses (0.0.0.0)
564
+ * Running on http://127.0.0.1:5000
565
+ * Running on http://192.168.0.103:5000
566
+ 2025-09-09 22:55:12,038 - MainThread - INFO - Press CTRL+C to quit
567
+ 2025-09-09 22:55:13,548 - Thread-1 (process_request_thread) - INFO - 127.0.0.1 - - [09/Sep/2025 22:55:13] "GET / HTTP/1.1" 200 -
568
+ 2025-09-09 22:55:19,311 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=1&timeout=30&allowed_updates=message HTTP/1.1" 200 337
569
+ 2025-09-09 22:55:19,313 - PollingThread - DEBUG - Received 1 new updates.
570
+ 2025-09-09 22:55:19,315 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'Field is irrigated and rice seed are sown'
571
+ 2025-09-09 22:55:19,316 - PollingThread - DEBUG - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
572
+ 2025-09-09 22:55:19,316 - PollingThread - DEBUG - Checking farmer Unknown: last_req_date=, last_rec_date=, today=2025-09-09
573
+ 2025-09-09 22:55:19,318 - PollingThread - DEBUG - No specific farmer found awaiting a *new* update today for message: 'Field is irrigated and rice seed are sown'
574
+ 2025-09-09 22:55:19,318 - Thread-3 (process_general_message_and_respond_in_thread) - INFO - Sending general prompt to Gemini (attempt 1): 'Field is irrigated and rice seed are sown...'
575
+ 2025-09-09 22:55:19,322 - PollingThread - DEBUG - Created backup of data.json at data.json.backup
576
+ 2025-09-09 22:55:19,327 - PollingThread - DEBUG - Data successfully saved to data.json
577
+ 2025-09-09 22:55:19,328 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199374, timeout: 30s)...
578
+ 2025-09-09 22:55:19,338 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
579
+ 2025-09-09 22:55:32,067 - Thread-3 (process_general_message_and_respond_in_thread) - INFO - Received general response from Gemini: 'Excellent! Now focus on maintaining consistent soil moisture. Monitor for seedling emergence and a...'
580
+ 2025-09-09 22:55:32,067 - Thread-3 (process_general_message_and_respond_in_thread) - DEBUG - Attempt 1: Sending Telegram message to 5397241102 - 'Excellent! Now focus on maintaining consistent so...'
581
+ 2025-09-09 22:55:32,069 - Thread-3 (process_general_message_and_respond_in_thread) - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
582
+ 2025-09-09 22:55:37,107 - Thread-3 (process_general_message_and_respond_in_thread) - DEBUG - https://api.telegram.org:443 "POST /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/sendMessage HTTP/1.1" 200 457
583
+ 2025-09-09 22:55:37,108 - Thread-3 (process_general_message_and_respond_in_thread) - INFO - Telegram message sent to chat_id 5397241102: 'Excellent! Now focus on maintaining consistent soil moisture. Monitor for seedling emergence and a...'
584
+ 2025-09-09 22:55:49,638 - MainThread - INFO - Received signal 2. Initiating shutdown...
585
+ 2025-09-09 22:55:49,639 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
586
+ 2025-09-09 23:00:07,581 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
587
+ 2025-09-09 23:00:07,584 - MainThread - INFO - Starting background threads...
588
+ 2025-09-09 23:00:07,585 - PollingThread - INFO - Polling thread started.
589
+ 2025-09-09 23:00:07,585 - PollingThread - DEBUG - Polling Telegram for updates (offset: 1, timeout: 30s)...
590
+ 2025-09-09 23:00:07,585 - SchedulerThread - INFO - Scheduler thread started.
591
+ 2025-09-09 23:00:07,585 - MainThread - INFO - Background threads started successfully.
592
+ 2025-09-09 23:00:07,586 - SchedulerThread - INFO - New day detected: 2025-09-09. Resetting daily scheduler flags.
593
+ 2025-09-09 23:00:07,590 - MainThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
594
+ 2025-09-09 23:00:07,591 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
595
+ 2025-09-09 23:00:07,611 - SchedulerThread - DEBUG - Scheduler sleeping for 53 seconds until next minute check (current second: 7)...
596
+ 2025-09-09 23:00:08,496 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=1&timeout=30&allowed_updates=message HTTP/1.1" 200 325
597
+ 2025-09-09 23:00:08,496 - PollingThread - DEBUG - Received 1 new updates.
598
+ 2025-09-09 23:00:08,497 - PollingThread - INFO - Received message from Pranit Chilbule (chat_id: 5397241102): 'What is data under farms.json'
599
+ 2025-09-09 23:00:08,497 - PollingThread - DEBUG - Message received in global CHAT_ID (5397241102). Checking for farmer updates.
600
+ 2025-09-09 23:00:08,498 - PollingThread - DEBUG - Checking farmer Unknown: last_req_date=, last_rec_date=, today=2025-09-09
601
+ 2025-09-09 23:00:08,498 - PollingThread - DEBUG - No specific farmer found awaiting a *new* update today for message: 'What is data under farms.json'
602
+ 2025-09-09 23:00:08,499 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Sending general prompt to Gemini (attempt 1): 'What is data under farms.json...'
603
+ 2025-09-09 23:00:08,502 - PollingThread - DEBUG - Created backup of data.json at data.json.backup
604
+ 2025-09-09 23:00:08,504 - PollingThread - DEBUG - Data successfully saved to data.json
605
+ 2025-09-09 23:00:08,504 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
606
+ 2025-09-09 23:00:08,508 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
607
+ 2025-09-09 23:00:08,537 - MainThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getMe HTTP/1.1" 200 259
608
+ 2025-09-09 23:00:08,538 - MainThread - INFO - Telegram Bot connected: @KrishiBotmitrabot (Krishi Mitra)
609
+ 2025-09-09 23:00:08,538 - MainThread - INFO - Starting Flask application...
610
+ 2025-09-09 23:00:08,560 - MainThread - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
611
+ * Running on all addresses (0.0.0.0)
612
+ * Running on http://127.0.0.1:5000
613
+ * Running on http://192.168.0.103:5000
614
+ 2025-09-09 23:00:08,560 - MainThread - INFO - Press CTRL+C to quit
615
+ 2025-09-09 23:00:10,595 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Received general response from Gemini: 'Hello! As Krushi Mitra, I can't access local files like "farms.json" on your computer. That file li...'
616
+ 2025-09-09 23:00:10,595 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - Attempt 1: Sending Telegram message to 5397241102 - 'Hello! As Krushi Mitra, I can't access local file...'
617
+ 2025-09-09 23:00:10,597 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
618
+ 2025-09-09 23:00:11,827 - Thread-1 (process_general_message_and_respond_in_thread) - DEBUG - https://api.telegram.org:443 "POST /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/sendMessage HTTP/1.1" 200 639
619
+ 2025-09-09 23:00:11,829 - Thread-1 (process_general_message_and_respond_in_thread) - INFO - Telegram message sent to chat_id 5397241102: 'Hello! As Krushi Mitra, I can't access local files like "farms.json" on your computer. That file li...'
620
+ 2025-09-09 23:00:40,453 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
621
+ 2025-09-09 23:00:40,458 - PollingThread - DEBUG - Received 0 new updates.
622
+ 2025-09-09 23:00:40,458 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
623
+ 2025-09-09 23:00:40,468 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
624
+ 2025-09-09 23:01:11,427 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
625
+ 2025-09-09 23:01:11,436 - PollingThread - DEBUG - Received 0 new updates.
626
+ 2025-09-09 23:01:11,442 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
627
+ 2025-09-09 23:01:11,452 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
628
+ 2025-09-09 23:01:42,390 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
629
+ 2025-09-09 23:01:42,392 - PollingThread - DEBUG - Received 0 new updates.
630
+ 2025-09-09 23:01:42,393 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
631
+ 2025-09-09 23:01:42,395 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
632
+ 2025-09-09 23:02:13,301 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
633
+ 2025-09-09 23:02:13,305 - PollingThread - DEBUG - Received 0 new updates.
634
+ 2025-09-09 23:02:13,305 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
635
+ 2025-09-09 23:02:13,309 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
636
+ 2025-09-09 23:02:45,569 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
637
+ 2025-09-09 23:02:45,573 - PollingThread - DEBUG - Received 0 new updates.
638
+ 2025-09-09 23:02:45,574 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
639
+ 2025-09-09 23:02:45,577 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
640
+ 2025-09-09 23:03:18,529 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
641
+ 2025-09-09 23:03:18,531 - PollingThread - DEBUG - Received 0 new updates.
642
+ 2025-09-09 23:03:18,532 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
643
+ 2025-09-09 23:03:18,535 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
644
+ 2025-09-09 23:03:51,245 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
645
+ 2025-09-09 23:03:51,247 - PollingThread - DEBUG - Received 0 new updates.
646
+ 2025-09-09 23:03:51,248 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
647
+ 2025-09-09 23:03:51,251 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
648
+ 2025-09-09 23:04:22,175 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
649
+ 2025-09-09 23:04:22,179 - PollingThread - DEBUG - Received 0 new updates.
650
+ 2025-09-09 23:04:22,180 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
651
+ 2025-09-09 23:04:22,185 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
652
+ 2025-09-09 23:04:53,081 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
653
+ 2025-09-09 23:04:53,085 - PollingThread - DEBUG - Received 0 new updates.
654
+ 2025-09-09 23:04:53,086 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
655
+ 2025-09-09 23:04:53,091 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
656
+ 2025-09-09 23:05:24,041 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
657
+ 2025-09-09 23:05:24,043 - PollingThread - DEBUG - Received 0 new updates.
658
+ 2025-09-09 23:05:24,043 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
659
+ 2025-09-09 23:05:24,047 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
660
+ 2025-09-09 23:05:54,941 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
661
+ 2025-09-09 23:05:54,945 - PollingThread - DEBUG - Received 0 new updates.
662
+ 2025-09-09 23:05:54,947 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
663
+ 2025-09-09 23:05:54,962 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
664
+ 2025-09-09 23:06:25,901 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
665
+ 2025-09-09 23:06:25,903 - PollingThread - DEBUG - Received 0 new updates.
666
+ 2025-09-09 23:06:25,903 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
667
+ 2025-09-09 23:06:25,905 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
668
+ 2025-09-09 23:06:56,813 - PollingThread - DEBUG - https://api.telegram.org:443 "GET /bot8328709566:AAH7ZmdWuzGODlTByJ34yI5yR9e8otBokBc/getUpdates?offset=193199375&timeout=30&allowed_updates=message HTTP/1.1" 200 23
669
+ 2025-09-09 23:06:56,817 - PollingThread - DEBUG - Received 0 new updates.
670
+ 2025-09-09 23:06:56,817 - PollingThread - DEBUG - Polling Telegram for updates (offset: 193199375, timeout: 30s)...
671
+ 2025-09-09 23:06:56,821 - PollingThread - DEBUG - Starting new HTTPS connection (1): api.telegram.org:443
672
+ 2025-09-09 23:13:55,205 - MainThread - CRITICAL - BOT_TOKEN is not set or is still the placeholder. Please set the BOT_TOKEN environment variable or change it in the script.
673
+ 2025-09-09 23:13:55,206 - MainThread - CRITICAL - CHAT_ID is not set or is still the placeholder. This is now the primary chat for all farmers and tests. Please set the CHAT_ID environment variable or change it in the script.
674
+ 2025-09-09 23:13:55,206 - MainThread - CRITICAL - GEMINI_API_KEY is not set or is still the placeholder. Please set the GEMINI_API_KEY environment variable or change it in the script.
675
+ 2025-09-09 23:13:55,206 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
676
+ 2025-09-09 23:13:55,268 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
677
+ 2025-09-09 23:15:11,102 - MainThread - CRITICAL - BOT_TOKEN is not set or is still the placeholder. Please set the BOT_TOKEN environment variable or change it in the script.
678
+ 2025-09-09 23:15:11,102 - MainThread - CRITICAL - CHAT_ID is not set or is still the placeholder. This is now the primary chat for all farmers and tests. Please set the CHAT_ID environment variable or change it in the script.
679
+ 2025-09-09 23:15:11,103 - MainThread - CRITICAL - GEMINI_API_KEY is not set or is still the placeholder. Please set the GEMINI_API_KEY environment variable or change it in the script.
680
+ 2025-09-09 23:15:11,103 - MainThread - INFO - Gemini model initialized successfully (gemini-1.5-flash).
681
+ 2025-09-09 23:15:11,134 - MainThread - INFO - Setting polling_active to False to signal background threads to stop...
chat_log.json ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "role": "user",
4
+ "username": "Pranit",
5
+ "chat_id": "5397241102",
6
+ "text": "Hii",
7
+ "ts": "2025-09-10T05:53:46.793244Z"
8
+ },
9
+ {
10
+ "role": "bot",
11
+ "username": "Bot",
12
+ "chat_id": "5397241102",
13
+ "text": "Hi there! How can I help you today?",
14
+ "ts": "2025-09-10T05:53:47.789218Z"
15
+ },
16
+ {
17
+ "role": "user",
18
+ "username": "Pranit",
19
+ "chat_id": "5397241102",
20
+ "text": "My rice plant has a brown spot on it.",
21
+ "ts": "2025-09-10T05:54:56.290357Z"
22
+ },
23
+ {
24
+ "role": "bot",
25
+ "username": "Bot (Scheduled for Pranit)",
26
+ "chat_id": "5397241102",
27
+ "text": "What's the update regarding your farm?",
28
+ "ts": "2025-09-10T05:55:01.738142Z"
29
+ },
30
+ {
31
+ "role": "bot",
32
+ "username": "Bot",
33
+ "chat_id": "5397241102",
34
+ "text": "Okay, a brown spot on your rice plant could be a number of things. To give you the BEST advice, I need a little more information. But let's start with a general assessment and some immediate steps you can take:\n\n**1. Gather More Information (Tell me more!):**\n\n* **What part of the plant has the spot?** (Leaf, stem, grain?)\n* **What does the spot look like?** (Color, size, shape, is it raised, sunken, does it have a halo around it?)\n* **How many plants are affected?** (Just one, a few, or widespread?)\n* **What stage of growth is the rice plant at?** (Seedling, tillering, panicle initiation, heading, grain filling?)\n* **What is your irrigation/watering schedule like?**\n* **What are the current weather conditions?** (High humidity, recent rainfall, drought?)\n* **Have you used any fertilizers or pesticides recently?**\n* **Where are you located geographically?** (This helps me narrow down region-specific diseases.)\n\n**2. General Potential Problems & Immediate Actions:**\n\nBased on \"brown spot\" alone, here are some possibilities:\n\n* **Brown Spot Disease (Helminthosporium oryzae):** This is a very common fungal disease.\n * **Symptoms:** Small, oval to circular brown spots appear on leaves, glumes (the husk of the grain), and stems. The spots often have a dark brown center with a lighter brown halo. Severely infected plants can have reduced yields.\n * **Immediate Actions:**\n * **Remove and Destroy Infected Plants:** If it's just a few plants, carefully remove and burn or bury them away from the rice paddy. Do NOT compost them.\n * **Improve Air Circulation:** If your rice is planted very densely, consider thinning it out (if possible at this stage) to improve air circulation and reduce humidity around the plants.\n * **Check Soil Fertility:** Brown spot is often exacerbated by nutrient deficiencies, particularly potassium (K).\n * **Avoid Excessive Nitrogen:** While nitrogen is important, too much can make plants more susceptible to disease. Ensure balanced fertilization.\n\n* **Other Fungal Diseases:** Several other fungi can cause brown lesions. These might require specific identification to choose the right treatment. (e.g., Sheath blight, leaf blast).\n\n* **Bacterial Leaf Streak/Blight:** While often more yellow/orange, bacterial infections can sometimes present with brownish lesions.\n\n* **Nutrient Deficiency (Potassium, Iron, Phosphorus):** Deficiencies can weaken plants and make them more susceptible to disease, sometimes manifesting as brown spots.\n\n* **Pesticide Burn/Fertilizer Burn:** If you recently applied chemicals, this could be the cause.\n\n**3. Detailed Actions (Pending More Information):**\n\n* **Monitor and Track:** Carefully observe the progression of the spots. Are they getting bigger? Are they spreading to other plants? Take pictures regularly to document changes.\n* **Soil Test:** Get a soil test done. This will tell you exactly what nutrients are lacking in your soil and allow you to adjust your fertilization program accordingly. Pay particular attention to potassium (K), phosphorus (P), and iron (Fe) levels.\n* **Fungicide Application (If Necessary):** *I only recommend this after identifying the problem and if the infestation is severe.* If it's brown spot or another fungal disease, consider a fungicide approved for rice. Consult your local agricultural extension agent for recommendations on appropriate fungicides and application rates for your region and the specific disease. **Always follow the label instructions carefully.** Common options may include:\n * Mancozeb-based fungicides\n * Propiconazole\n * Tebuconazole\n* **Water Management:** Avoid standing water on the leaves for extended periods, as this creates a favorable environment for fungal growth. Improve drainage if necessary. Consider alternate wetting and drying (AWD) irrigation if appropriate for your variety and region.\n\n**4. Prevention is Key:**\n\n* **Use Disease-Resistant Varieties:** If possible, plant rice varieties that are resistant to com...",
35
+ "ts": "2025-09-10T05:55:04.183228Z"
36
+ },
37
+ {
38
+ "role": "user",
39
+ "username": "Pranit",
40
+ "chat_id": "5397241102",
41
+ "text": "My rice plant has a brown spot on it.",
42
+ "ts": "2025-09-10T05:59:40.570224Z"
43
+ },
44
+ {
45
+ "role": "bot",
46
+ "username": "Bot",
47
+ "chat_id": "5397241102",
48
+ "text": "I've received your query about 'My rice plant has a brown spot on it....'. The admin will review the AI's suggestion and schedule a response to you.",
49
+ "ts": "2025-09-10T05:59:52.138858Z"
50
+ },
51
+ {
52
+ "role": "user",
53
+ "username": "Pranit",
54
+ "chat_id": "5397241102",
55
+ "text": "Hii",
56
+ "ts": "2025-09-10T06:06:12.500497Z"
57
+ },
58
+ {
59
+ "role": "bot",
60
+ "username": "Bot",
61
+ "chat_id": "5397241102",
62
+ "text": "I've received your query about 'Hii...'. The admin will review the AI's suggestion and schedule a response to you.",
63
+ "ts": "2025-09-10T06:06:13.381978Z"
64
+ },
65
+ {
66
+ "role": "user",
67
+ "username": "Pranit",
68
+ "chat_id": "5397241102",
69
+ "text": "Hiii",
70
+ "ts": "2025-09-10T06:06:48.765751Z"
71
+ },
72
+ {
73
+ "role": "bot",
74
+ "username": "Bot",
75
+ "chat_id": "5397241102",
76
+ "text": "I've received your query about 'Hiii...'. The admin will review the AI's suggestion and schedule a response to you.",
77
+ "ts": "2025-09-10T06:06:49.734480Z"
78
+ },
79
+ {
80
+ "role": "bot",
81
+ "username": "Bot (Scheduled for Pranit)",
82
+ "chat_id": "5397241102",
83
+ "text": "What's the update regarding your farm? Please share details about your crops, any issues you're facing, and current farming activities.",
84
+ "ts": "2025-09-10T06:16:01.544382Z"
85
+ },
86
+ {
87
+ "role": "user",
88
+ "username": "Pranit",
89
+ "chat_id": "5397241102",
90
+ "text": "My rice plant has a brown spot on it.",
91
+ "ts": "2025-09-10T06:16:17.295019Z"
92
+ },
93
+ {
94
+ "role": "bot",
95
+ "username": "Bot",
96
+ "chat_id": "5397241102",
97
+ "text": "I've received your query about 'My rice plant has a brown spot on it....'. The admin will review the AI's suggested response and schedule it to be sent to you.",
98
+ "ts": "2025-09-10T06:16:18.417207Z"
99
+ },
100
+ {
101
+ "role": "user",
102
+ "username": "Pranit",
103
+ "chat_id": "5397241102",
104
+ "text": "Hii",
105
+ "ts": "2025-09-10T06:22:49.646912Z"
106
+ },
107
+ {
108
+ "role": "bot",
109
+ "username": "Bot",
110
+ "chat_id": "5397241102",
111
+ "text": "I've received your query about 'Hii...'. The admin will review the AI's suggested response and schedule it to be sent to you.",
112
+ "ts": "2025-09-10T06:22:50.696631Z"
113
+ },
114
+ {
115
+ "role": "user",
116
+ "username": "Pranit",
117
+ "chat_id": "5397241102",
118
+ "text": "Hii",
119
+ "ts": "2025-09-10T09:15:39.928763Z"
120
+ },
121
+ {
122
+ "role": "bot",
123
+ "username": "Bot",
124
+ "chat_id": "5397241102",
125
+ "text": "I've received your query about 'Hii...'. The admin will review the AI's suggested response and schedule it to be sent to you.",
126
+ "ts": "2025-09-10T09:15:41.273940Z"
127
+ },
128
+ {
129
+ "role": "user",
130
+ "username": "Pranit",
131
+ "chat_id": "5397241102",
132
+ "text": "My rice plant has a brown spot on it.",
133
+ "ts": "2025-09-10T09:15:56.914117Z"
134
+ },
135
+ {
136
+ "role": "bot",
137
+ "username": "Bot",
138
+ "chat_id": "5397241102",
139
+ "text": "I've received your query about 'My rice plant has a brown spot on it....'. The admin will review the AI's suggested response and schedule it to be sent to you.",
140
+ "ts": "2025-09-10T09:15:58.236229Z"
141
+ },
142
+ {
143
+ "role": "user",
144
+ "username": "Pranit",
145
+ "chat_id": "5397241102",
146
+ "text": "Hii",
147
+ "ts": "2025-09-10T09:57:28.758468Z"
148
+ },
149
+ {
150
+ "role": "bot",
151
+ "username": "Bot",
152
+ "chat_id": "5397241102",
153
+ "text": "I've received your query about 'Hii...'. The admin will review the AI's suggested response and schedule it to be sent to you.",
154
+ "ts": "2025-09-10T09:57:29.992151Z"
155
+ },
156
+ {
157
+ "role": "user",
158
+ "username": "Pranit",
159
+ "chat_id": "5397241102",
160
+ "text": "Hello",
161
+ "ts": "2025-09-10T09:58:34.972237Z"
162
+ },
163
+ {
164
+ "role": "bot",
165
+ "username": "Bot",
166
+ "chat_id": "5397241102",
167
+ "text": "I've received your query about 'Hello...'. The admin will review the AI's suggested response and schedule it to be sent to you.",
168
+ "ts": "2025-09-10T09:58:36.154315Z"
169
+ },
170
+ {
171
+ "role": "user",
172
+ "username": "Pranit",
173
+ "chat_id": "5397241102",
174
+ "text": "Hii",
175
+ "ts": "2025-09-10T10:10:51.999198Z"
176
+ },
177
+ {
178
+ "role": "bot",
179
+ "username": "Bot",
180
+ "chat_id": "5397241102",
181
+ "text": "I've received your query about 'Hii...'. The admin will review the AI's suggested response and schedule it to be sent to you.",
182
+ "ts": "2025-09-10T10:10:53.279607Z"
183
+ }
184
+ ]
data.json ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "messages": [
3
+ {
4
+ "sender": "You",
5
+ "text": "hii",
6
+ "time": "2025-09-09 14:54:57"
7
+ },
8
+ {
9
+ "sender": "You",
10
+ "text": "hii",
11
+ "time": "2025-09-09 14:54:59"
12
+ },
13
+ {
14
+ "sender": "Pranit",
15
+ "text": "Hello",
16
+ "time": "2025-09-09 14:55:04"
17
+ },
18
+ {
19
+ "sender": "Pranit",
20
+ "text": "Hello",
21
+ "time": "2025-09-09 14:55:06"
22
+ },
23
+ {
24
+ "sender": "Scheduled",
25
+ "text": "hiii",
26
+ "time": "2025-09-09 15:05:01"
27
+ },
28
+ {
29
+ "sender": "Pranit",
30
+ "text": "/start",
31
+ "time": "2025-09-09 15:07:16"
32
+ },
33
+ {
34
+ "sender": "Pranit",
35
+ "text": "/start",
36
+ "time": "2025-09-09 15:07:18"
37
+ },
38
+ {
39
+ "sender": "Pranit",
40
+ "text": "Hii",
41
+ "time": "2025-09-09 21:24:23"
42
+ },
43
+ {
44
+ "sender": "Pranit",
45
+ "text": "Hii",
46
+ "time": "2025-09-09 21:24:24"
47
+ },
48
+ {
49
+ "sender": "Pranit",
50
+ "text": "Hello",
51
+ "time": "2025-09-09 21:24:33"
52
+ },
53
+ {
54
+ "sender": "Pranit",
55
+ "text": "Hello",
56
+ "time": "2025-09-09 21:24:34"
57
+ },
58
+ {
59
+ "sender": "Scheduled",
60
+ "text": "hiii",
61
+ "time": "2025-09-09 21:25:02"
62
+ },
63
+ {
64
+ "sender": "You",
65
+ "text": "send update regarding your farm",
66
+ "time": "2025-09-09 21:29:57"
67
+ },
68
+ {
69
+ "sender": "Scheduled",
70
+ "text": "send update regarding your farm",
71
+ "time": "2025-09-09 21:32:02"
72
+ },
73
+ {
74
+ "sender": "Scheduled",
75
+ "text": "send update reagrding your farm",
76
+ "time": "2025-09-09 21:36:01"
77
+ },
78
+ {
79
+ "sender": "Pranit",
80
+ "text": "I have financial issue in my personal life as students",
81
+ "time": "2025-09-09 21:36:47"
82
+ },
83
+ {
84
+ "sender": "Pranit",
85
+ "text": "I have financial issue in my personal life as students",
86
+ "time": "2025-09-09 21:36:49"
87
+ },
88
+ {
89
+ "sender": "Gemini",
90
+ "text": "Apologies, I encountered an error trying to process your request with AI.",
91
+ "time": "2025-09-09 21:36:51"
92
+ },
93
+ {
94
+ "sender": "Pranit",
95
+ "text": "I have financial issue in my personal life as students",
96
+ "time": "2025-09-09 21:37:46"
97
+ },
98
+ {
99
+ "sender": "Scheduled",
100
+ "text": "send update regarding your farm",
101
+ "time": "2025-09-09 22:18:00"
102
+ },
103
+ {
104
+ "sender": "Pranit Chilbule",
105
+ "text": "I have financial issue in my personal life as students",
106
+ "time": "2025-09-09 22:18:20"
107
+ },
108
+ {
109
+ "sender": "Krushi Mitra Bot",
110
+ "text": "Namaste! I understand you're facing financial challenges as a student. That can be tough. While I primarily focus on farming-related information, here's some general advice and how it *might* tie into agriculture:\n\n* **Explore Student Aid:** Check if your educational institution offers financial aid, scholarships, or grants. These are specific to your studies and can ease the immediate burden.\n\n* **Part-Time Work (Consider Agriculture-Related Options):** Look for part-time jobs. Depending on your location and skills, agricultural work (seasonal harvesting, farm help, etc.) could be an option. Some university agricultural programs also offer research assistant positions to students.\n\n* **Budgeting and Expense Tracking:** Track your spending and identify areas where you can cut back. Even small savings can add up.\n\n* **Sustainable Living (if applicable to farming):** If you have access to a small garden or plot of land (even on a balcony), consider growing some of your own food. This can reduce grocery expenses.\n\n* **Consult a Financial Advisor (if possible):** Many colleges and universities offer free financial advising to students.\n\n**Important Note:** My expertise is in agriculture. If your financial issues are deeply affecting your studies or mental well-being, please reach out to your student support services at your college or university, a financial advisor, or a trusted friend or family member. They can provide more tailored advice and support.",
111
+ "time": "2025-09-09 22:18:25"
112
+ },
113
+ {
114
+ "sender": "System Test",
115
+ "text": "🌾 Krushi Mitra Bot is online and ready to help!",
116
+ "time": "2025-09-09 22:27:05"
117
+ },
118
+ {
119
+ "sender": "Scheduled",
120
+ "text": "send update regarding your farm",
121
+ "time": "2025-09-09 22:28:00"
122
+ },
123
+ {
124
+ "sender": "Scheduled",
125
+ "text": "send update regarding your farm",
126
+ "time": "2025-09-09 22:30:00"
127
+ },
128
+ {
129
+ "sender": "Pranit Chilbule",
130
+ "text": "Updates are rice seed sown today and watered the field",
131
+ "time": "2025-09-09 22:39:15"
132
+ },
133
+ {
134
+ "sender": "Pranit Chilbule",
135
+ "text": "Updates are rice seed sown today and watered the field",
136
+ "time": "2025-09-09 22:45:03"
137
+ },
138
+ {
139
+ "sender": "Pranit Chilbule",
140
+ "text": "Field is irrigated and rice seed are sown",
141
+ "time": "2025-09-09 22:47:18"
142
+ },
143
+ {
144
+ "sender": "Pranit Chilbule",
145
+ "text": "Field is irrigated and rice seed are sown",
146
+ "time": "2025-09-09 22:51:54"
147
+ },
148
+ {
149
+ "sender": "Pranit Chilbule",
150
+ "text": "Field is irrigated and rice seed are sown",
151
+ "time": "2025-09-09 22:55:19"
152
+ },
153
+ {
154
+ "sender": "Pranit Chilbule",
155
+ "text": "What is data under farms.json",
156
+ "time": "2025-09-09 23:00:08"
157
+ }
158
+ ],
159
+ "schedules": [
160
+ {
161
+ "text": "hiii",
162
+ "time": "21:25",
163
+ "last_sent_date": "2025-09-09"
164
+ },
165
+ {
166
+ "text": "send update regarding your farm",
167
+ "time": "21:32",
168
+ "last_sent_date": "2025-09-09"
169
+ },
170
+ {
171
+ "text": "send update reagrding your farm",
172
+ "time": "21:36",
173
+ "last_sent_date": "2025-09-09"
174
+ },
175
+ {
176
+ "text": "send me test",
177
+ "time": "21:00",
178
+ "last_sent_date": ""
179
+ },
180
+ {
181
+ "text": "send me test",
182
+ "time": "23:01",
183
+ "last_sent_date": ""
184
+ },
185
+ {
186
+ "text": "send update regarding your farm",
187
+ "time": "22:18",
188
+ "last_sent_date": "2025-09-09"
189
+ },
190
+ {
191
+ "text": "send update regarding your farm",
192
+ "time": "22:28",
193
+ "last_sent_date": "2025-09-09"
194
+ },
195
+ {
196
+ "text": "send update regarding your farm",
197
+ "time": "22:30",
198
+ "last_sent_date": "2025-09-09"
199
+ }
200
+ ]
201
+ }
data.json.backup ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "messages": [
3
+ {
4
+ "sender": "You",
5
+ "text": "hii",
6
+ "time": "2025-09-09 14:54:57"
7
+ },
8
+ {
9
+ "sender": "You",
10
+ "text": "hii",
11
+ "time": "2025-09-09 14:54:59"
12
+ },
13
+ {
14
+ "sender": "Pranit",
15
+ "text": "Hello",
16
+ "time": "2025-09-09 14:55:04"
17
+ },
18
+ {
19
+ "sender": "Pranit",
20
+ "text": "Hello",
21
+ "time": "2025-09-09 14:55:06"
22
+ },
23
+ {
24
+ "sender": "Scheduled",
25
+ "text": "hiii",
26
+ "time": "2025-09-09 15:05:01"
27
+ },
28
+ {
29
+ "sender": "Pranit",
30
+ "text": "/start",
31
+ "time": "2025-09-09 15:07:16"
32
+ },
33
+ {
34
+ "sender": "Pranit",
35
+ "text": "/start",
36
+ "time": "2025-09-09 15:07:18"
37
+ },
38
+ {
39
+ "sender": "Pranit",
40
+ "text": "Hii",
41
+ "time": "2025-09-09 21:24:23"
42
+ },
43
+ {
44
+ "sender": "Pranit",
45
+ "text": "Hii",
46
+ "time": "2025-09-09 21:24:24"
47
+ },
48
+ {
49
+ "sender": "Pranit",
50
+ "text": "Hello",
51
+ "time": "2025-09-09 21:24:33"
52
+ },
53
+ {
54
+ "sender": "Pranit",
55
+ "text": "Hello",
56
+ "time": "2025-09-09 21:24:34"
57
+ },
58
+ {
59
+ "sender": "Scheduled",
60
+ "text": "hiii",
61
+ "time": "2025-09-09 21:25:02"
62
+ },
63
+ {
64
+ "sender": "You",
65
+ "text": "send update regarding your farm",
66
+ "time": "2025-09-09 21:29:57"
67
+ },
68
+ {
69
+ "sender": "Scheduled",
70
+ "text": "send update regarding your farm",
71
+ "time": "2025-09-09 21:32:02"
72
+ },
73
+ {
74
+ "sender": "Scheduled",
75
+ "text": "send update reagrding your farm",
76
+ "time": "2025-09-09 21:36:01"
77
+ },
78
+ {
79
+ "sender": "Pranit",
80
+ "text": "I have financial issue in my personal life as students",
81
+ "time": "2025-09-09 21:36:47"
82
+ },
83
+ {
84
+ "sender": "Pranit",
85
+ "text": "I have financial issue in my personal life as students",
86
+ "time": "2025-09-09 21:36:49"
87
+ },
88
+ {
89
+ "sender": "Gemini",
90
+ "text": "Apologies, I encountered an error trying to process your request with AI.",
91
+ "time": "2025-09-09 21:36:51"
92
+ },
93
+ {
94
+ "sender": "Pranit",
95
+ "text": "I have financial issue in my personal life as students",
96
+ "time": "2025-09-09 21:37:46"
97
+ },
98
+ {
99
+ "sender": "Scheduled",
100
+ "text": "send update regarding your farm",
101
+ "time": "2025-09-09 22:18:00"
102
+ },
103
+ {
104
+ "sender": "Pranit Chilbule",
105
+ "text": "I have financial issue in my personal life as students",
106
+ "time": "2025-09-09 22:18:20"
107
+ },
108
+ {
109
+ "sender": "Krushi Mitra Bot",
110
+ "text": "Namaste! I understand you're facing financial challenges as a student. That can be tough. While I primarily focus on farming-related information, here's some general advice and how it *might* tie into agriculture:\n\n* **Explore Student Aid:** Check if your educational institution offers financial aid, scholarships, or grants. These are specific to your studies and can ease the immediate burden.\n\n* **Part-Time Work (Consider Agriculture-Related Options):** Look for part-time jobs. Depending on your location and skills, agricultural work (seasonal harvesting, farm help, etc.) could be an option. Some university agricultural programs also offer research assistant positions to students.\n\n* **Budgeting and Expense Tracking:** Track your spending and identify areas where you can cut back. Even small savings can add up.\n\n* **Sustainable Living (if applicable to farming):** If you have access to a small garden or plot of land (even on a balcony), consider growing some of your own food. This can reduce grocery expenses.\n\n* **Consult a Financial Advisor (if possible):** Many colleges and universities offer free financial advising to students.\n\n**Important Note:** My expertise is in agriculture. If your financial issues are deeply affecting your studies or mental well-being, please reach out to your student support services at your college or university, a financial advisor, or a trusted friend or family member. They can provide more tailored advice and support.",
111
+ "time": "2025-09-09 22:18:25"
112
+ },
113
+ {
114
+ "sender": "System Test",
115
+ "text": "🌾 Krushi Mitra Bot is online and ready to help!",
116
+ "time": "2025-09-09 22:27:05"
117
+ },
118
+ {
119
+ "sender": "Scheduled",
120
+ "text": "send update regarding your farm",
121
+ "time": "2025-09-09 22:28:00"
122
+ },
123
+ {
124
+ "sender": "Scheduled",
125
+ "text": "send update regarding your farm",
126
+ "time": "2025-09-09 22:30:00"
127
+ },
128
+ {
129
+ "sender": "Pranit Chilbule",
130
+ "text": "Updates are rice seed sown today and watered the field",
131
+ "time": "2025-09-09 22:39:15"
132
+ },
133
+ {
134
+ "sender": "Pranit Chilbule",
135
+ "text": "Updates are rice seed sown today and watered the field",
136
+ "time": "2025-09-09 22:45:03"
137
+ },
138
+ {
139
+ "sender": "Pranit Chilbule",
140
+ "text": "Field is irrigated and rice seed are sown",
141
+ "time": "2025-09-09 22:47:18"
142
+ },
143
+ {
144
+ "sender": "Pranit Chilbule",
145
+ "text": "Field is irrigated and rice seed are sown",
146
+ "time": "2025-09-09 22:51:54"
147
+ },
148
+ {
149
+ "sender": "Pranit Chilbule",
150
+ "text": "Field is irrigated and rice seed are sown",
151
+ "time": "2025-09-09 22:55:19"
152
+ }
153
+ ],
154
+ "schedules": [
155
+ {
156
+ "text": "hiii",
157
+ "time": "21:25",
158
+ "last_sent_date": "2025-09-09"
159
+ },
160
+ {
161
+ "text": "send update regarding your farm",
162
+ "time": "21:32",
163
+ "last_sent_date": "2025-09-09"
164
+ },
165
+ {
166
+ "text": "send update reagrding your farm",
167
+ "time": "21:36",
168
+ "last_sent_date": "2025-09-09"
169
+ },
170
+ {
171
+ "text": "send me test",
172
+ "time": "21:00",
173
+ "last_sent_date": ""
174
+ },
175
+ {
176
+ "text": "send me test",
177
+ "time": "23:01",
178
+ "last_sent_date": ""
179
+ },
180
+ {
181
+ "text": "send update regarding your farm",
182
+ "time": "22:18",
183
+ "last_sent_date": "2025-09-09"
184
+ },
185
+ {
186
+ "text": "send update regarding your farm",
187
+ "time": "22:28",
188
+ "last_sent_date": "2025-09-09"
189
+ },
190
+ {
191
+ "text": "send update regarding your farm",
192
+ "time": "22:30",
193
+ "last_sent_date": "2025-09-09"
194
+ }
195
+ ]
196
+ }
farmers.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "747b4b24-e078-419e-9a7b-39ac123e1c18",
4
+ "timestamp": "2025-09-09T14:43:26.135733Z",
5
+ "farmer_name": "John Doe",
6
+ "phone": "9763059811",
7
+ "preferred_lang_time": "marathi/morning",
8
+ "farm_name": "Green Acres Farm",
9
+ "farming_type": "Dairy Farming",
10
+ "geo": {
11
+ "latitude": 19.949761,
12
+ "longitude": 79.250843
13
+ },
14
+ "area": "4.2973 ha",
15
+ "soil_type": "Loam",
16
+ "soil_depth": "Medium (20–60 cm)",
17
+ "ph_category": "Neutral (6.5–7.5)",
18
+ "organic_matter_level": "Medium (2–4%)",
19
+ "irrigation_source": "Borewell / Tube well (electric)",
20
+ "water_quality": "Good (suitable)",
21
+ "irrigation_infrastructure": [],
22
+ "crops": [],
23
+ "horti_crops": [],
24
+ "dairy_num_animals_cows": "100",
25
+ "dairy_num_animals_buffaloes": "0",
26
+ "dairy_num_animals_goats": "0",
27
+ "dairy_breeds": "Holstein Friesian",
28
+ "dairy_avg_milk_production": 11.8,
29
+ "dairy_fodder_source": [
30
+ "Purchased feed"
31
+ ],
32
+ "dairy_veterinary_access": "Regular vet visits",
33
+ "dairy_milk_storage": "Chilling unit",
34
+ "dairy_market_access": "Local consumers",
35
+ "dairy_product_diversification": [
36
+ "Milk"
37
+ ],
38
+ "poultry_type": [],
39
+ "poultry_num_birds": "",
40
+ "poultry_housing_type": "",
41
+ "poultry_feed_source": "",
42
+ "poultry_health_mgmt": "",
43
+ "poultry_production_capacity": "",
44
+ "poultry_market_access": "",
45
+ "horti_type": [],
46
+ "horti_protection_type": [],
47
+ "horti_post_harvest_handling": [],
48
+ "horti_market_access": "",
49
+ "plantation_type": [],
50
+ "plantation_area_each": "",
51
+ "plantation_age_plants": "",
52
+ "plantation_processing_facilities": "",
53
+ "plantation_yield_per_unit": "",
54
+ "plantation_market_access": "",
55
+ "plantation_shade_management": "",
56
+ "polygon_coords": [
57
+ [
58
+ 19.95129410473285,
59
+ 79.25058546970862
60
+ ],
61
+ [
62
+ 19.94838961996317,
63
+ 79.24981299351234
64
+ ],
65
+ [
66
+ 19.948147577153357,
67
+ 79.2508858771183
68
+ ],
69
+ [
70
+ 19.951374784102434,
71
+ 79.25187293003577
72
+ ]
73
+ ]
74
+ }
75
+ ]
general_ai_responses.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "general_ai_5397241102_1757499053_4798",
4
+ "chat_id": "5397241102",
5
+ "username": "Pranit",
6
+ "original_query": "Hii",
7
+ "ai_response": "Hello! How can I help you with your farming needs today? Do you have a specific question about crops, livestock, soil, or any other agricultural topic? Let me know what you're looking for.",
8
+ "generation_time": "2025-09-10T15:40:53.278613+05:30",
9
+ "status": "pending_review"
10
+ }
11
+ ]
scheduled_messages.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "5397241102_reminder_1757483700_1351",
4
+ "chat_id": "5397241102",
5
+ "username": "Pranit",
6
+ "message": "What's the update regarding your farm?",
7
+ "scheduled_time": "2025-09-10T11:25:00+05:30",
8
+ "type": "reminder",
9
+ "status": "sent",
10
+ "created_at": "2025-09-10T11:24:14.542453+05:30",
11
+ "sent_time": "2025-09-10T11:25:01.738142+05:30"
12
+ },
13
+ {
14
+ "id": "5397241102_reminder_1757484960_2385",
15
+ "chat_id": "5397241102",
16
+ "username": "Pranit",
17
+ "message": "What's the update regarding your farm? Please share details about your crops, any issues you're facing, and current farming activities.",
18
+ "scheduled_time": "2025-09-10T11:46:00+05:30",
19
+ "type": "reminder",
20
+ "status": "sent",
21
+ "created_at": "2025-09-10T11:45:09.137458+05:30",
22
+ "sent_time": "2025-09-10T11:46:01.544382+05:30"
23
+ },
24
+ {
25
+ "id": "5397241102_farm_update_request_1757495013_7790",
26
+ "chat_id": "5397241102",
27
+ "username": "Default Farmer",
28
+ "message": "What's the update regarding your farm? Please share details about your crops, any issues you're facing, and current farming activities.",
29
+ "scheduled_time": "2025-09-10T14:33:33.320433+05:30",
30
+ "type": "farm_update_request",
31
+ "status": "pending",
32
+ "created_at": "2025-09-10T14:28:33.320433+05:30"
33
+ },
34
+ {
35
+ "id": "5397241102_reminder_1757494740_7790",
36
+ "chat_id": "5397241102",
37
+ "username": "Pranit",
38
+ "message": "What's the update regarding your farm? Please share details about your crops, any issues you're facing, and current farming activities.",
39
+ "scheduled_time": "2025-09-10T14:29:00+05:30",
40
+ "type": "reminder",
41
+ "status": "pending",
42
+ "created_at": "2025-09-10T14:28:49.235577+05:30"
43
+ },
44
+ {
45
+ "id": "5397241102_reminder_1757495640_7446",
46
+ "chat_id": "5397241102",
47
+ "username": "Default Farmer",
48
+ "message": "What's the update regarding your farm? Please share details about your crops, any issues you're facing, and current farming activities.",
49
+ "scheduled_time": "2025-09-10T14:44:00+05:30",
50
+ "type": "reminder",
51
+ "status": "pending",
52
+ "created_at": "2025-09-10T14:43:37.213898+05:30"
53
+ }
54
+ ]
test_index.py ADDED
File without changes