python /home/admin/mtr/script_for_cron.py -j default -m 20 -a 'python3 ~/workarea/git/Velours/python/mtr/utils/delete_rows_database.py --nb_batch=10 --limit=500 --table="datou_result" --date="20250101" --verbose ' -s delete_datou_result -M 0 -S 0 -U 100,100,100 import MySQLdb succeeded on va faire 10 occurences de suppression de 500 photos batch : 0/9 select id from MTRPhoto.mtr_datou_result order by id desc where created_at < "20250101" LIMIT 500; Catched exception ! Connect or reconnect ! Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 68, in select cursor.execute(query, args) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 209, in execute res = self._query(query) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 315, in _query db.query(q) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 239, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'where created_at < "20250101" LIMIT 500\' at line 3') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/utils/delete_rows_database.py", line 195, in id_list_final = dict_table[args.table][1](args, gq, verbose) File "/home/admin/workarea/git/Velours/python/mtr/utils/delete_rows_database.py", line 50, in get_cs_id_datou_result id_list = gq.select(cs_id_from_type) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 79, in select cursor.execute(query, args) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 209, in execute res = self._query(query) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 315, in _query db.query(q) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 239, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'where created_at < "20250101" LIMIT 500\' at line 3') Command exited with non-zero status 1 0.16user 0.03system 0:00.36elapsed 53%CPU (0avgtext+0avgdata 32240maxresident)k 0inputs+0outputs (0major+4946minor)pagefaults 0swaps