SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740545 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740545) result : ((1347565180,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740546 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740546) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740547 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740547) result : ((1347565159,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740548 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740548) result : ((1347564417,), (1347564678,), (1347565161,), (1347565163,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740549 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740549) result : ((1347564413,), (1347564505,), (1347564506,), (1347564673,), (1347565088,), (1347565089,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740550 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740550) result : ((1347564511,), (1347564512,), (1347565128,), (1347565130,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21740551 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21740539 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740551) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21740539) result : ((1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (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 ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21740539 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','papier','mal_croppe','Teint_Dans_La_Masse','cartonnette','autre_refus','Carton_brun','kraft','flou','environnement','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21740539 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','papier','mal_croppe','Teint_Dans_La_Masse','cartonnette','autre_refus','Carton_brun','kraft','flou','environnement','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 21740539, 'sub_port_id': 21740552, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265622, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'Teint_Dans_La_Masse': {'main_port_id': 21740539, 'sub_port_id': 21740553, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265623, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'flou': {'main_port_id': 21740539, 'sub_port_id': 21740554, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265624, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'metal': {'main_port_id': 21740539, 'sub_port_id': 21740555, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265625, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'environnement': {'main_port_id': 21740539, 'sub_port_id': 21740556, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265626, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'kraft': {'main_port_id': 21740539, 'sub_port_id': 21740557, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265627, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'papier': {'main_port_id': 21740539, 'sub_port_id': 21740558, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265628, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'plastique': {'main_port_id': 21740539, 'sub_port_id': 21740559, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265629, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'Carton_brun': {'main_port_id': 21740539, 'sub_port_id': 21740560, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265630, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'autre_refus': {'main_port_id': 21740539, 'sub_port_id': 21740561, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265631, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'cartonnette': {'main_port_id': 21740539, 'sub_port_id': 21740562, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265632, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}, 'mal_croppe': {'main_port_id': 21740539, 'sub_port_id': 21740563, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14265633, 'last_updated_at': datetime.datetime(2025, 3, 26, 18, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 18, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 18, 50)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740552,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740540 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740553,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740541 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740554,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740542 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740555,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740543 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740556,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740544 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740557,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740545 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740558,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740546 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740559,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740547 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740560,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740548 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740561,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740549 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740562,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740550 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21740563,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21740551 lien utilise dans velours : https://www.fotonower.com/velours/21740552,21740553,21740554,21740555,21740556,21740557,21740558,21740559,21740560,21740561,21740562,21740563?tags=Carton_gris,Teint_Dans_La_Masse,flou,metal,environnement,kraft,papier,plastique,Carton_brun,autre_refus,cartonnette,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21740539]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] map_info['map_portfolio_photo'] : {21740539: [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716, 1347564689, 1347564683, 1347564681, 1347564671, 1347564642, 1347564638, 1347564633, 1347564628, 1347564624, 1347564622, 1347564472, 1347564467, 1347564463, 1347564314, 1347564166, 1347564128, 1347564125, 1347564097, 1347564095, 1347564090, 1347564086, 1347564081, 1347564077, 1347564011, 1347564007, 1347564004, 1347563948, 1347563942, 1347563859, 1347563856]} final : False mtd_id 4302 list_pids : [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] Looping around the photos to save general results len do output : 1 /21740539. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21740539', "{'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551}", None, None, None, None, '2693745'), ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745')] time used for this insertion : 0.17962980270385742 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.577584981918335 time spend to save output : 0.1800823211669922 total time spend for step 1 : 1.7576673030853271 step2:final Wed Mar 26 18:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21740539) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 21740539 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1347563948,1347563942,1347563859,1347563856,1347564011,1347564007,1347564004,1347564097,1347564095,1347564090,1347564086,1347564081,1347564077,1347564314,1347564166,1347564128,1347564125,1347564472,1347564467,1347564463,1347564642,1347564638,1347564633,1347564628,1347564624,1347564622,1347564689,1347564683,1347564681,1347564734,1347564671,1347564728,1347564724,1347564720,1347564718,1347564716,1347564767,1347564764,1347564762,1347564760); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21740539]) Inside saveOutput : final : False verbose : True original output for save of step final : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} new output for save of step final : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] map_info['map_portfolio_photo'] : {21740539: [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716, 1347564689, 1347564683, 1347564681, 1347564671, 1347564642, 1347564638, 1347564633, 1347564628, 1347564624, 1347564622, 1347564472, 1347564467, 1347564463, 1347564314, 1347564166, 1347564128, 1347564125, 1347564097, 1347564095, 1347564090, 1347564086, 1347564081, 1347564077, 1347564011, 1347564007, 1347564004, 1347563948, 1347563942, 1347563859, 1347563856]} final : False mtd_id 4302 list_pids : [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] Looping around the photos to save general results len do output : 10 /1347564767.Didn't retrieve data . /1347564764.Didn't retrieve data . /1347564762.Didn't retrieve data . /1347564760.Didn't retrieve data . /1347564734.Didn't retrieve data . /1347564728.Didn't retrieve data . /1347564724.Didn't retrieve data . /1347564720.Didn't retrieve data . /1347564718.Didn't retrieve data . /1347564716.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21740539', '1347564767', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564764', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564762', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564760', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564734', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564728', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564724', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564720', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564718', '0.051882718071063365', None, None, None, None, '2693745'), ('4302', '21740539', '1347564716', '0.051882718071063365', None, None, None, None, '2693745')] time used for this insertion : 0.020099401473999023 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07394909858703613 time spend to save output : 0.020569801330566406 total time spend for step 2 : 0.09451889991760254 step3:velours_tree Wed Mar 26 18:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21740539: [{'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551}]} input_args_next_step : {21740539: ()} output_args : {21740539: [{'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551}]} args : 21740539 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21740539) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21740539]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.4330141544342041 time spend to save output : 5.984306335449219e-05 total time spend for step 3 : 0.4330739974975586 step4:send_mail_cod Wed Mar 26 18:57:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} input_args_next_step : {1347564767: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564767 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564764 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564762 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564760 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564734 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564728 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564724 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564720 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564718 depend.output_id : 0 input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ()} output_args : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',)} args : 1347564716 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {21740539: [{'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551}]} input_args_next_step : {1347564767: ('0.051882718071063365',), 1347564764: ('0.051882718071063365',), 1347564762: ('0.051882718071063365',), 1347564760: ('0.051882718071063365',), 1347564734: ('0.051882718071063365',), 1347564728: ('0.051882718071063365',), 1347564724: ('0.051882718071063365',), 1347564720: ('0.051882718071063365',), 1347564718: ('0.051882718071063365',), 1347564716: ('0.051882718071063365',), 21740539: ()} output_args : {21740539: [{'Carton_gris': 21740540, 'Teint_Dans_La_Masse': 21740541, 'flou': 21740542, 'metal': 21740543, 'environnement': 21740544, 'kraft': 21740545, 'papier': 21740546, 'plastique': 21740547, 'Carton_brun': 21740548, 'autre_refus': 21740549, 'cartonnette': 21740550, 'mal_croppe': 21740551}]} args : 21740539 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :11, first value : ('0.051882718071063365',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21740539) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1347564767,1347564764,1347564762,1347564760,1347564734,1347564728,1347564724,1347564720,1347564718,1347564716) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347564716 begin to download photo : 1347564724 begin to download photo : 1347564760 begin to download photo : 1347564767 download finish for photo 1347564760 begin to download photo : 1347564762 download finish for photo 1347564716 begin to download photo : 1347564718 download finish for photo 1347564767 download finish for photo 1347564724 begin to download photo : 1347564728 download finish for photo 1347564762 begin to download photo : 1347564764 download finish for photo 1347564718 begin to download photo : 1347564720 download finish for photo 1347564728 begin to download photo : 1347564734 download finish for photo 1347564764 download finish for photo 1347564720 download finish for photo 1347564734 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette217405421743011820/ imagette217405431743011820/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P21740539_26-03-2025_18_57_00.pdf 21740542 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740542 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217405421743011820 21740543 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740543 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217405431743011820 21740545 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740545 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347565180: '1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593228_0.png'} change filename to text .imagette217405451743011820/ imagette217405451743011820/1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593228_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/0aacbb5dcdb7eae1020b5e2dad077300_31361561.png imagette217405451743011820 21740547 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740547 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347565159: '1743011753_2040838_1347564642_71fba2dfb8c5486d82fba9023bbcbdc6_rle_crop_3731597633_0.png'} change filename to text .imagette217405471743011820/ imagette217405471743011820/1743011753_2040838_1347564642_71fba2dfb8c5486d82fba9023bbcbdc6_rle_crop_3731597633_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/c112a7277227e2eafe6d2a2d5d434202_140311.png imagette217405471743011820 21740549 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740549 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347564413: '1743011411_2037881_1347564004_2321847e9bd9ca1e6bae8fac9bc1094b_rle_crop_3731579216_0.png', 1347564505: '1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581164_0.png', 1347564506: '1743011431_2038125_1347563942_598d3d0179e11e89157140658971771c_rle_crop_3731581183_0.png', 1347564673: '1743011551_2039184_1347564314_7c70aa1162efb2839b183964f11504b3_rle_crop_3731581978_0.png', 1347565088: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593134_0.png', 1347565089: '1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593227_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/41b421cb44f42ce5ce8cc8759793c913_66085067.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/55cd004c2212c46a61f25451711f1a75_15826548.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/4c46cf09b6cd5ddd5b158b5a563926c6_48339145.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/c28fc71d28d5eed80242dd0f9c9776d4_39964556.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/94ebfccb3523d2564f4c08ffaa1badb0_67672822.png change filename to text .imagette217405491743011820/ imagette217405491743011820/1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581164_0.png.png imagette217405491743011820/1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593227_0.png.png imagette217405491743011820/1743011431_2038125_1347563942_598d3d0179e11e89157140658971771c_rle_crop_3731581183_0.png.png imagette217405491743011820/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593134_0.png.png imagette217405491743011820/1743011411_2037881_1347564004_2321847e9bd9ca1e6bae8fac9bc1094b_rle_crop_3731579216_0.png.png imagette217405491743011820/1743011551_2039184_1347564314_7c70aa1162efb2839b183964f11504b3_rle_crop_3731581978_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/b0d44e61a314fae614e4f7931d4a14e7_95194572.png imagette217405491743011820 21740550 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740550 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347564511: '1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581191_0.png', 1347564512: '1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581194_0.png', 1347565128: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593128_0.png', 1347565130: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593129_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/f99300b0869a3e44b24ef6d9ad29fe48_89687856.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/0825f0761221301965de0b1f77b4d046_87291897.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/e3f9f0cf13a58767523f5ff27b57c7ee_58937492.png change filename to text .imagette217405501743011820/ imagette217405501743011820/1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581191_0.png.png imagette217405501743011820/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593128_0.png.png imagette217405501743011820/1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581194_0.png.png imagette217405501743011820/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593129_0.png.png imagette217405511743011821/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/705e7238743a13f2e6da5e64ae65042b_94290051.png imagette217405501743011820 21740551 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740551 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217405511743011821 21740540 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740540 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347564415: '1743011411_2037881_1347564004_2321847e9bd9ca1e6bae8fac9bc1094b_rle_crop_3731579214_0.png', 1347564508: '1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581168_0.png', 1347564509: '1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581198_0.png', 1347564510: '1743011431_2038125_1347563856_dced4c2dd16e6e14933a507d8939c5e6_rle_crop_3731581204_0.png', 1347564674: '1743011551_2039184_1347564095_58d956b72bec2094c47c16e55cf308ae_rle_crop_3731581987_0.png', 1347564675: '1743011551_2039184_1347564090_0192ac20692b00a47dc3108cc1b9a3bd_rle_crop_3731581998_0.png', 1347565106: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593137_0.png', 1347565107: '1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593166_0.png', 1347565134: '1743011753_2040838_1347564463_42092115f641d29b762942e56f95a920_rle_crop_3731597697_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/2d4e8bc027251c2aa3ff781260d37f35_728360.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/9944d57ffd9cc50269ef043a2a657643_3836316.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/e57c96d673b79a28809487a639e624d1_90839727.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/321ffbbffcc4895cf467f0de2c4c163e_10818948.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/cfd41929fde5a3ea0ae1620811dba8ac_43921940.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/9cf85444ed868dded59fe87ff838dbcd_62994825.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/bc3aae9ad1e54a06e7af5bdc2d940dd8_35608094.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/9f9efa208f28950bac5d27d74ac70a6d_20603740.png change filename to text .imagette217405401743011821/ imagette217405401743011821/1743011551_2039184_1347564090_0192ac20692b00a47dc3108cc1b9a3bd_rle_crop_3731581998_0.png.png imagette217405401743011821/1743011431_2038125_1347563856_dced4c2dd16e6e14933a507d8939c5e6_rle_crop_3731581204_0.png.png imagette217405401743011821/1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581168_0.png.png imagette217405401743011821/1743011411_2037881_1347564004_2321847e9bd9ca1e6bae8fac9bc1094b_rle_crop_3731579214_0.png.png imagette217405401743011821/1743011431_2038125_1347563859_a3959cfbead0f4be31f2c6e70ccdda9a_rle_crop_3731581198_0.png.png imagette217405401743011821/1743011753_2040838_1347564463_42092115f641d29b762942e56f95a920_rle_crop_3731597697_0.png.png imagette217405401743011821/1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593166_0.png.png imagette217405401743011821/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593137_0.png.png imagette217405401743011821/1743011551_2039184_1347564095_58d956b72bec2094c47c16e55cf308ae_rle_crop_3731581987_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/c941bec888f7996804c05f3793297c6a_76714270.png imagette217405401743011821 21740541 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740541 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347564503: '1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581173_0.png', 1347564504: '1743011431_2038125_1347563856_dced4c2dd16e6e14933a507d8939c5e6_rle_crop_3731581207_0.png', 1347564649: '1743011532_2039006_1347564166_e6c0a5628ad503540d029235158ad948_rle_crop_3731581831_0.png', 1347564650: '1743011532_2039006_1347564125_ce9a0585f15ae799d31bea36de7aff68_rle_crop_3731581849_0.png', 1347565048: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593140_0.png', 1347565051: '1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593176_0.png', 1347565054: '1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593236_0.png', 1347565057: '1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593235_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/8274e09d27c2f51cc8940bc8e862c29b_66508504.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/41c38d3d860cf2a22638554aa69c327e_76126936.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/466be9336d90fd59d4d07ee600fbda55_86920033.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/4fe11ab08424d669631f7dc197664422_6310794.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/4469dc329c7282cec858ea5c20c49391_39343954.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/6f9ec6611da4af56553cc510a106eb81_27398416.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/e0ddc33f4c0e988eaa117a033df5f385_19351128.png change filename to text .imagette217405411743011821/ imagette217405411743011821/1743011532_2039006_1347564125_ce9a0585f15ae799d31bea36de7aff68_rle_crop_3731581849_0.png.png imagette217405411743011821/1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593236_0.png.png imagette217405411743011821/1743011532_2039006_1347564166_e6c0a5628ad503540d029235158ad948_rle_crop_3731581831_0.png.png imagette217405411743011821/1743011714_2040465_1347564633_3b392665d8c24baa0ae4eb9ebafb36c8_rle_crop_3731593235_0.png.png imagette217405411743011821/1743011431_2038125_1347563856_dced4c2dd16e6e14933a507d8939c5e6_rle_crop_3731581207_0.png.png imagette217405411743011821/1743011431_2038125_1347563948_144a14b6f0b910e1b11e0444c935c5e6_rle_crop_3731581173_0.png.png imagette217405411743011821/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593140_0.png.png imagette217405411743011821/1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593176_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/2bf75362851b186197da1477238c3f0a_6952353.png imagette217405411743011821 21740548 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740548 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347564417: '1743011411_2037881_1347564007_ae13788412744cca22e786f6cbc37adf_rle_crop_3731579186_0.png', 1347564678: '1743011551_2039184_1347564081_c204491189598482b4be53684e456f2e_rle_crop_3731582093_0.png', 1347565161: '1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593130_0.png', 1347565163: '1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593178_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/ead62d025ba186c0c83067d1fb1178ed_51334138.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/ac6ea5522109567958a1e907a87defdb_87235032.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/ad3e6aaf430a7023fa9bff69568a0164_21075225.png change filename to text .imagette217405481743011822/ imagette217405481743011822/1743011411_2037881_1347564007_ae13788412744cca22e786f6cbc37adf_rle_crop_3731579186_0.png.png imagette217405481743011822/1743011551_2039184_1347564081_c204491189598482b4be53684e456f2e_rle_crop_3731582093_0.png.png imagette217405481743011822/1743011714_2040465_1347564689_017cb91d307678c8f42bfea1695c45aa_rle_crop_3731593130_0.png.png imagette217405481743011822/1743011714_2040465_1347564638_caffdb1b30863c772d141bfb23ba9698_rle_crop_3731593178_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/0049a45e8241d9db2a04db3ced526be6_40706111.png imagette217405481743011822 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21740539 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21740552,21740553,21740554,21740555,21740556,21740557,21740558,21740559,21740560,21740561,21740562,21740563?tags=Carton_gris,Teint_Dans_La_Masse,flou,metal,environnement,kraft,papier,plastique,Carton_brun,autre_refus,cartonnette,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1347564767] : ('0.051882718071063365',) no score found for photo 1347564767 We are sending mail with results at report@fotonower.com args[1347564764] : ('0.051882718071063365',) no score found for photo 1347564764 We are sending mail with results at report@fotonower.com args[1347564762] : ('0.051882718071063365',) no score found for photo 1347564762 We are sending mail with results at report@fotonower.com args[1347564760] : ('0.051882718071063365',) no score found for photo 1347564760 We are sending mail with results at report@fotonower.com args[1347564734] : ('0.051882718071063365',) no score found for photo 1347564734 We are sending mail with results at report@fotonower.com args[1347564728] : ('0.051882718071063365',) no score found for photo 1347564728 We are sending mail with results at report@fotonower.com args[1347564724] : ('0.051882718071063365',) no score found for photo 1347564724 We are sending mail with results at report@fotonower.com args[1347564720] : ('0.051882718071063365',) no score found for photo 1347564720 We are sending mail with results at report@fotonower.com args[1347564718] : ('0.051882718071063365',) no score found for photo 1347564718 We are sending mail with results at report@fotonower.com args[1347564716] : ('0.051882718071063365',) no score found for photo 1347564716 We are sending mail with results at report@fotonower.com refus_total : 0.051882718071063365 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740539 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf results_Auto_P21740539_26-03-2025_18_57_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21740539','results_Auto_P21740539_26-03-2025_18_57_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf','pdf','','0.22','0.051882718071063365') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21740539]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] map_info['map_portfolio_photo'] : {21740539: [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716, 1347564689, 1347564683, 1347564681, 1347564671, 1347564642, 1347564638, 1347564633, 1347564628, 1347564624, 1347564622, 1347564472, 1347564467, 1347564463, 1347564314, 1347564166, 1347564128, 1347564125, 1347564097, 1347564095, 1347564090, 1347564086, 1347564081, 1347564077, 1347564011, 1347564007, 1347564004, 1347563948, 1347563942, 1347563859, 1347563856]} final : False mtd_id 4302 list_pids : [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21740539', '1347564767', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745')] time used for this insertion : 0.015828847885131836 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.9089596271514893 time spend to save output : 0.016086578369140625 total time spend for step 4 : 3.92504620552063 step5:split_time_score Wed Mar 26 18:57:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21740539'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('21740539',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21740539) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347564767: {'path': 'temp/1743011820_4107939_1347564767_8812ea7cbbecb38a5dada9e901fc02af.jpg', 'extension': 'jpg'}, 1347564760: {'path': 'temp/1743011820_4107939_1347564760_0badb96bcb2d97d78792191d7295e35d.jpg', 'extension': 'jpg'}, 1347564762: {'path': 'temp/1743011820_4107939_1347564762_5ba1db45c38a98a3df64d1cc953ceed5.jpg', 'extension': 'jpg'}, 1347564764: {'path': 'temp/1743011820_4107939_1347564764_28a586f50dbecaf994e5a16bbe888161.jpg', 'extension': 'jpg'}, 1347564716: {'path': 'temp/1743011820_4107939_1347564716_a9c58ad618fc4c35b5053cc61d7f0e12.jpg', 'extension': 'jpg'}, 1347564718: {'path': 'temp/1743011820_4107939_1347564718_9fb79d20ae7bf6a43f9f971987b7c924.jpg', 'extension': 'jpg'}, 1347564720: {'path': 'temp/1743011820_4107939_1347564720_6c997a1af67854b85ac27812c5ca2f86.jpg', 'extension': 'jpg'}, 1347564724: {'path': 'temp/1743011820_4107939_1347564724_d29c529dc5c8d5e7a500d75026004618.jpg', 'extension': 'jpg'}, 1347564728: {'path': 'temp/1743011820_4107939_1347564728_ee71f5daff5c209904fe9bbb082bb152.jpg', 'extension': 'jpg'}, 1347564734: {'path': 'temp/1743011820_4107939_1347564734_b956db2050232f04f19aa30285942f93.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 21740539; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 21740539 group by h (('18', 40),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21740539 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (21740539) AND cps.thcl in (861) order by cps.score desc LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (21740539) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 26032025 21740539 Nombre de photos uploadées : 40 / 23040 (0%) 26032025 21740539 Nombre de photos taguées (types de déchets): 0 / 40 (0%) 26032025 21740539 Nombre de photos taguées (volume) : 0 / 40 (0%) [{'photo_id': 1347563948, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/144a14b6f0b910e1b11e0444c935c5e6.jpg', 'username': None, 'uploaded_at': 1743011235, 'text': 'image_26032025_18_45_04_010151m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1347563942, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/598d3d0179e11e89157140658971771c.jpg', 'username': None, 'uploaded_at': 1743011235, 'text': 'image_26032025_18_45_14_010136m0.jpg 2e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1347563859, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/a3959cfbead0f4be31f2c6e70ccdda9a.jpg', 'username': None, 'uploaded_at': 1743011235, 'text': 'image_26032025_18_45_24_010134m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1347563856, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/dced4c2dd16e6e14933a507d8939c5e6.jpg', 'username': None, 'uploaded_at': 1743011235, 'text': 'image_26032025_18_45_44_010137m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 9.5367431640625e-06 ???????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0031948089599609375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21740539, '2025-03-26' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1689284,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03094625473022461 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1689284 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698600, 'mtr_portfolio_id': 21738482, 'dashboard_result_id': 9643474, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21738482_26-03-2025_18_20_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21738507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21738508, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21738509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21738510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21738511, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21738512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21738513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21738514, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21738515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21738516, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21738517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21738518, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698600, 'mtr_portfolio_id': 21739307, 'dashboard_result_id': 9643475, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739307_26-03-2025_18_35_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739342, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21739343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739345, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739347, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739349, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739350, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739351, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739352, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698600, 'mtr_portfolio_id': 21739892, 'dashboard_result_id': 9643476, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739892_26-03-2025_18_47_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21739958, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739960, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739961, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739962, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739963, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739965, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739969, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698600, 'mtr_portfolio_id': 21740539, 'dashboard_result_id': 9643477, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_55_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21740540, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21740541, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21740542, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21740543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21740544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21740545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21740546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21740547, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21740548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21740549, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21740550, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21740551, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21738482 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2693629, 'mtr_portfolio_id': 21738482, 'created_at': datetime.datetime(2025, 3, 26, 18, 20), 'result': '0.046361595799186264', 'result_long': None, 'result_double': None}] Qualite : 0.046361595799186264 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21738482 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21738482_26-03-2025_18_20_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21738482 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21738482_26-03-2025_18_20_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21738507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21738508, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21738509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21738510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21738511, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21738512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21738513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21738514, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21738515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21738516, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21738517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21738518, 'pht': 3726}}" where mtr_portfolio_id = 21738482 and dashboard_run_id = 1698600 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21738482 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9643474, 0.046361595799186264, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21738482_26-03-2025_18_20_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21738507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21738508, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21738509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21738510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21738511, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21738512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21738513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21738514, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21738515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21738516, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21738517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21738518, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21739307 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2693665, 'mtr_portfolio_id': 21739307, 'created_at': datetime.datetime(2025, 3, 26, 18, 35), 'result': '0.0362267520998383', 'result_long': None, 'result_double': None}] Qualite : 0.0362267520998383 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21739307 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739307_26-03-2025_18_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21739307 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739307_26-03-2025_18_35_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739342, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21739343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739345, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739347, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739349, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739350, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739351, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739352, 'pht': 3726}}" where mtr_portfolio_id = 21739307 and dashboard_run_id = 1698600 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21739307 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9643475, 0.0362267520998383, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739307_26-03-2025_18_35_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739342, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21739343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739345, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739347, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739349, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739350, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739351, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739352, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21739892 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2693706, 'mtr_portfolio_id': 21739892, 'created_at': datetime.datetime(2025, 3, 26, 18, 47, 58), 'result': '0.035892357396174766', 'result_long': None, 'result_double': None}] Qualite : 0.035892357396174766 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21739892 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739892_26-03-2025_18_47_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21739892 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739892_26-03-2025_18_47_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21739958, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739960, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739961, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739962, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739963, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739965, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739969, 'pht': 3726}}" where mtr_portfolio_id = 21739892 and dashboard_run_id = 1698600 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21739892 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9643476, 0.035892357396174766, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21739892_26-03-2025_18_47_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21739958, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21739959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21739960, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21739961, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21739962, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21739963, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21739964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21739965, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21739966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21739967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21739968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21739969, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21740539 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2693745, 'mtr_portfolio_id': 21740539, 'created_at': datetime.datetime(2025, 3, 26, 18, 56, 59), 'result': '0.051882718071063365', 'result_long': None, 'result_double': None}] Qualite : 0.051882718071063365 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21740539 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21740539 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21740540, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21740541, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21740542, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21740543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21740544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21740545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21740546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21740547, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21740548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21740549, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21740550, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21740551, 'pht': 3726}}" where mtr_portfolio_id = 21740539 and dashboard_run_id = 1698600 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21740539 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9643477, 0.051882718071063365, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21740539_26-03-2025_18_57_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21740540, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21740541, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21740542, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21740543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21740544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21740545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21740546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21740547, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21740548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21740549, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21740550, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21740551, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21738482,21739307,21739892,21740539) result : ((1347553533,), (1347553557,), (1347553572,), (1347553911,), (1347553965,), (1347554020,), (1347554912,), (1347554959,), (1347555008,), (1347555057,), (1347555089,), (1347555201,), (1347555688,), (1347555761,), (1347555799,), (1347556156,), (1347556180,), (1347556203,), (1347556241,), (1347556263,), (1347556293,), (1347556524,), (1347556541,), (1347556545,), (1347556554,), (1347556823,), (1347556919,), (1347556939,), (1347556958,), (1347556988,), (1347557043,), (1347557209,), (1347557293,), (1347557324,), (1347557356,), (1347557577,), (1347557580,), (1347557584,), (1347557589,), (1347557617,), (1347557649,), (1347557770,), (1347557798,), (1347557824,), (1347557851,), (1347557866,), (1347558008,), (1347558010,), (1347558014,), (1347558016,), (1347558021,), (1347558107,), (1347558142,), (1347558169,), (1347558204,), (1347558230,), (1347558257,), (1347558555,), (1347558624,), (1347558675,), (1347558717,), (1347559034,), (1347559061,), (1347559089,), (1347559120,), (1347559146,), (1347559170,), (1347559309,), (1347559332,), (1347559340,), (1347559344,), (1347559508,), (1347559454,), (1347559458,), (1347559468,), (1347559497,), (1347559504,), (1347559577,), (1347559601,), (1347559648,), (1347559720,), (1347559916,), (1347559934,), (1347559943,), (1347559957,), (1347559970,), (1347559982,), (1347560201,), (1347560212,), (1347560217,), (1347560223,), (1347560264,), (1347560267,), (1347560272,), (1347560280,), (1347560282,), (1347560311,), (1347560314,), (1347560316,), (1347560321,), (1347560370,), (1347560373,), (1347560376,), (1347560379,), (1347560381,), (1347560420,), (1347560434,), (1347560438,), (1347560442,), (1347560490,), (1347560495,), (1347560498,), (1347560501,), (1347560515,), (1347560518,), (1347560544,), (1347560601,), (1347560607,), (1347560613,), (1347560616,), (1347560652,), (1347560654,), (1347560657,), (1347560660,), (1347560691,), (1347560695,), (1347560697,), (1347560700,), (1347560702,), (1347560706,), (1347560743,), (1347560744,), (1347560745,), (1347560750,), (1347560819,), (1347560821,), (1347560823,), (1347560827,), (1347560830,), (1347560833,), (1347560902,), (1347560920,), (1347560925,), (1347560928,), (1347561211,), (1347561081,), (1347561094,), (1347561110,), (1347561172,), (1347561190,), (1347561445,), (1347561485,), (1347561520,), (1347561537,), (1347561585,), (1347561587,), (1347561592,), (1347561595,), (1347561599,), (1347561605,), (1347561641,), (1347561644,), (1347561646,), (1347561649,), (1347561651,), (1347561682,), (1347561686,), (1347561690,), (1347561695,), (1347561740,), (1347561745,), (1347561750,), (1347561755,), (1347561758,), (1347561767,), (1347561838,), (1347561840,), (1347561843,), (1347561891,), (1347562372,), (1347562389,), (1347562473,), (1347562509,), (1347562554,), (1347562751,), (1347562756,), (1347562784,), (1347562786,), (1347562804,), (1347562809,), (1347562895,), (1347562899,), (1347562901,), (1347562907,), (1347563012,), (1347563021,), (1347563025,), (1347563029,), (1347563033,), (1347563038,), (1347563118,), (1347563125,), (1347563148,), (1347563287,), (1347563443,), (1347563446,), (1347563450,), (1347563455,), (1347563518,), (1347563523,), (1347563526,), (1347563528,), (1347563732,), (1347563736,), (1347563738,), (1347563754,), (1347563778,), (1347563830,), (1347563955,), (1347563856,), (1347563859,), (1347563942,), (1347563948,), (1347564004,), (1347564007,), (1347564011,), (1347564077,), (1347564081,), (1347564086,), (1347564090,), (1347564095,), (1347564097,), (1347564125,), (1347564128,), (1347564166,), (1347564314,), (1347564463,), (1347564467,), (1347564472,), (1347564622,), (1347564624,), (1347564628,), (1347564633,), (1347564638,), (1347564642,), (1347564671,), (1347564681,), (1347564683,), (1347564689,), (1347564716,), (1347564718,), (1347564720,), (1347564724,), (1347564728,), (1347564734,), (1347564760,), (1347564762,), (1347564764,), (1347564767,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'26032025': {'nb_upload': 40, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21740539]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] map_info['map_portfolio_photo'] : {21740539: [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716, 1347564689, 1347564683, 1347564681, 1347564671, 1347564642, 1347564638, 1347564633, 1347564628, 1347564624, 1347564622, 1347564472, 1347564467, 1347564463, 1347564314, 1347564166, 1347564128, 1347564125, 1347564097, 1347564095, 1347564090, 1347564086, 1347564081, 1347564077, 1347564011, 1347564007, 1347564004, 1347563948, 1347563942, 1347563859, 1347563856]} final : True mtd_id 4302 list_pids : [1347564767, 1347564764, 1347564762, 1347564760, 1347564734, 1347564728, 1347564724, 1347564720, 1347564718, 1347564716] Looping around the photos to save general results len do output : 1 /21740539Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745') ('4302', None, None, None, None, None, None, None, '2693745') ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21740539', 'None', None, None, None, None, '2693745'), ('4302', '21740539', '1347564767', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564764', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564762', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564760', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564734', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564728', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564724', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564720', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564718', None, None, None, None, None, '2693745'), ('4302', '21740539', '1347564716', None, None, None, None, None, '2693745')] time used for this insertion : 0.014066696166992188 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3664259910583496 time spend to save output : 0.01439213752746582 total time spend for step 5 : 0.38081812858581543 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (2693745) 2.24user 2.23system 0:09.73elapsed 45%CPU (0avgtext+0avgdata 159152maxresident)k 25536inputs+12704outputs (119major+88099minor)pagefaults 0swaps