(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 22282640 , 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=22282511 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='environnement' 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 (22282640) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282641 , 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=22282511 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 (22282641) result : ((1351730353,), (1351730354,), (1351730355,), (1351730357,), (1351731223,), (1351731224,), (1351731225,), (1351732053,), (1351732058,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282642 , 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=22282511 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='flou' 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 (22282642) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282643 , 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=22282511 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 (22282643) result : ((1351730365,), (1351730366,), (1351730505,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282644 , 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=22282511 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='metal' 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 (22282644) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282645 , 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=22282511 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 (22282645) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282646 , 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=22282511 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_gris' 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 (22282646) result : ((1351730336,), (1351731212,), (1351731213,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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 22282647 , 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=22282511 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 (22282647) result : ((1351732089,), (1351732093,), (1351732097,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) 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`=22282511 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','flou','plastique','mal_croppe','kraft','Carton_brun','environnement','autre_refus','Carton_gris','cartonnette','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`=22282511 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','flou','plastique','mal_croppe','kraft','Carton_brun','environnement','autre_refus','Carton_gris','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22282511, 'sub_port_id': 22282648, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748026, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'kraft': {'main_port_id': 22282511, 'sub_port_id': 22282649, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748027, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 22282511, 'sub_port_id': 22282650, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748028, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'papier': {'main_port_id': 22282511, 'sub_port_id': 22282651, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748029, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'environnement': {'main_port_id': 22282511, 'sub_port_id': 22282652, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748030, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'cartonnette': {'main_port_id': 22282511, 'sub_port_id': 22282653, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748031, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'flou': {'main_port_id': 22282511, 'sub_port_id': 22282654, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748032, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'plastique': {'main_port_id': 22282511, 'sub_port_id': 22282655, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748033, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'metal': {'main_port_id': 22282511, 'sub_port_id': 22282656, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748034, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'mal_croppe': {'main_port_id': 22282511, 'sub_port_id': 22282657, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748035, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Carton_gris': {'main_port_id': 22282511, 'sub_port_id': 22282658, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748036, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Carton_brun': {'main_port_id': 22282511, 'sub_port_id': 22282659, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748037, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282648,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282636 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282649,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282637 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282650,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282638 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282651,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282639 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282652,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282640 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282653,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282641 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282654,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282642 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282655,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282643 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282656,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282644 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282657,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282645 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282658,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282646 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282659,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282647 lien utilise dans velours : https://www.fotonower.com/velours/22282648,22282649,22282650,22282651,22282652,22282653,22282654,22282655,22282656,22282657,22282658,22282659?tags=autre_refus,kraft,Teint_Dans_La_Masse,papier,environnement,cartonnette,flou,plastique,metal,mal_croppe,Carton_gris,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] map_info['map_portfolio_photo'] : {22282511: [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234, 1351731183, 1351731010, 1351730998, 1351730982, 1351730943, 1351730934, 1351730550, 1351730522, 1351730486, 1351730454, 1351730274, 1351730269, 1351730261, 1351730233, 1351730230, 1351730228, 1351729972, 1351729921, 1351729885, 1351729832, 1351729785, 1351729404, 1351729356, 1351729266, 1351729240, 1351729211, 1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] Looping around the photos to save general results len do output : 1 /22282511. 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, '2745163') ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163') 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', None, '22282511', "{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}", None, None, None, None, '2745163'), ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163')] time used for this insertion : 0.014022111892700195 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4954421520233154 time spend to save output : 0.014343976974487305 total time spend for step 1 : 1.5097861289978027 step2:final Fri Apr 11 16:00: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 ! 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 (22282511) 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 22282511 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1351726725,1351726519,1351726345,1351727662,1351727625,1351727582,1351727527,1351727480,1351727310,1351728453,1351728423,1351728106,1351727928,1351727898,1351727882,1351728578,1351728539,1351728912,1351728885,1351728880,1351728876,1351728873,1351729404,1351729356,1351729266,1351729240,1351729211,1351729972,1351729921,1351729885,1351729832,1351729785,1351730274,1351730269,1351730261,1351730233,1351730230,1351730228,1351730550,1351730522,1351730486,1351730454,1351731010,1351730998,1351730982,1351730943,1351730934,1351731263,1351731254,1351731183,1351731247,1351731239,1351731234,1351731589,1351731535,1351731485,1351731449); 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([22282511]) Inside saveOutput : final : False verbose : True original output for save of step final : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} new output for save of step final : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] map_info['map_portfolio_photo'] : {22282511: [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234, 1351731183, 1351731010, 1351730998, 1351730982, 1351730943, 1351730934, 1351730550, 1351730522, 1351730486, 1351730454, 1351730274, 1351730269, 1351730261, 1351730233, 1351730230, 1351730228, 1351729972, 1351729921, 1351729885, 1351729832, 1351729785, 1351729404, 1351729356, 1351729266, 1351729240, 1351729211, 1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] Looping around the photos to save general results len do output : 9 /1351731589.Didn't retrieve data . /1351731535.Didn't retrieve data . /1351731485.Didn't retrieve data . /1351731449.Didn't retrieve data . /1351731263.Didn't retrieve data . /1351731254.Didn't retrieve data . /1351731247.Didn't retrieve data . /1351731239.Didn't retrieve data . /1351731234.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, '2745163') ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '22282511', '1351731589', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731535', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731485', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731449', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731263', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731254', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731247', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731239', '0.04347204790948178', None, None, None, None, '2745163'), ('4302', '22282511', '1351731234', '0.04347204790948178', None, None, None, None, '2745163')] time used for this insertion : 0.012510538101196289 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06729960441589355 time spend to save output : 0.013063907623291016 total time spend for step 2 : 0.08036351203918457 step3:velours_tree Fri Apr 11 16:00: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 complete output_args for input 0 : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} input_args_next_step : {22282511: ()} output_args : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} args : 22282511 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 : ({'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) 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([22282511]) 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.3064765930175781 time spend to save output : 5.1975250244140625e-05 total time spend for step 3 : 0.30652856826782227 step4:send_mail_cod Fri Apr 11 16:00: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 : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} input_args_next_step : {1351731589: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731589 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731535 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731485 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731449 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731263 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731254 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731247 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731239 depend.output_id : 0 input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ()} output_args : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',)} args : 1351731234 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 : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} input_args_next_step : {1351731589: ('0.04347204790948178',), 1351731535: ('0.04347204790948178',), 1351731485: ('0.04347204790948178',), 1351731449: ('0.04347204790948178',), 1351731263: ('0.04347204790948178',), 1351731254: ('0.04347204790948178',), 1351731247: ('0.04347204790948178',), 1351731239: ('0.04347204790948178',), 1351731234: ('0.04347204790948178',), 22282511: ()} output_args : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} args : 22282511 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 :10, first value : ('0.04347204790948178',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) 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 (1351731589,1351731535,1351731485,1351731449,1351731263,1351731254,1351731247,1351731239,1351731234) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1351731234 begin to download photo : 1351731247 begin to download photo : 1351731263 begin to download photo : 1351731485 begin to download photo : 1351731589 download finish for photo 1351731485 begin to download photo : 1351731535 download finish for photo 1351731247 begin to download photo : 1351731254 download finish for photo 1351731589 download finish for photo 1351731234 begin to download photo : 1351731239 download finish for photo 1351731263 begin to download photo : 1351731449 download finish for photo 1351731535 download finish for photo 1351731239 download finish for photo 1351731449 download finish for photo 1351731254 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P22282511_11-04-2025_16_00_00.pdf 22282636 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=22282636 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351730328: '1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782198_0.png', 1351730329: '1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783431_0.png', 1351731201: '1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786546_0.png', 1351731202: '1744379652_1870356_1351726725_456113b9fba450cf200735974893b1ff_rle_crop_3757786581_0.png', 1351731203: '1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789101_0.png', 1351732003: '1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790329_0.png', 1351732011: '1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790326_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/be9200030f36312358bf34b9ab0cf974_46467551.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/75fefc9c91bff91d317bbd28a4b9fa1e_43543253.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/d027a4b7ac00ca794e123d18495bf33c_29284751.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/0cda08fc0709a4964b38848083dfee7d_77376583.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/32f450e2c7df2fb047e0f812eb69d404_76252616.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/25f2a2db5d5fc90f8ab7319d666838ad_87603595.png change filename to text .imagette222826361744380000/ imagette222826361744380000/1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789101_0.png.png imagette222826361744380000/1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786546_0.png.png imagette222826361744380000/1744379652_1870356_1351726725_456113b9fba450cf200735974893b1ff_rle_crop_3757786581_0.png.png imagette222826361744380000/1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783431_0.png.png imagette222826361744380000/1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790326_0.png.png imagette222826361744380000/1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782198_0.png.png imagette222826361744380000/1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790329_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/13ed0240564413085108ab2c0df97f54_56923919.png imagette222826361744380000 22282637 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=22282637 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351731226: '1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789098_0.png'} change filename to text .imagette222826371744380001/ imagette222826371744380001/1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789098_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/6584b5e97b0fee2fb131428453ffd725_83062635.png imagette222826371744380001 22282641 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=22282641 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351730353: '1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782199_0.png', 1351730354: '1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783028_0.png', 1351730355: '1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783038_0.png', 1351730357: '1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783433_0.png', 1351731223: '1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786549_0.png', 1351731224: '1744379652_1870356_1351726519_c33435d400fb56eddfea136dd45d0ae3_rle_crop_3757788834_0.png', 1351731225: '1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789102_0.png', 1351732053: '1744379623_85212_1351728423_a6ae38997b88bea636c9ae09d0bd9000_rle_crop_3757789211_0.png', 1351732058: '1744379623_85212_1351728106_36707719a0197b9d73170b67ba33ae00_rle_crop_3757790220_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/e9e02d94c2443f4f8caccb362a6f7462_72994421.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/bae0f884965dea72c853357cafd57794_25483224.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/d0e6cb7a757818d2451cc8e1eed7d0d2_20142983.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/0cd9a866d6561984dd00383807bc7e38_35504424.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/0fa25913b167fda90db9f18e8a20678b_6235725.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/75bbb6afd00ff59e409efb427f6a21fa_9380309.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/f6ffde3aaa10dd2d17e910028e55cd31_92624773.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/73ad9a681c3f639795116786d4b315aa_68806904.png change filename to text .imagette222826411744380001/ imagette222826411744380001/1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783038_0.png.png imagette222826411744380001/1744379623_85212_1351728423_a6ae38997b88bea636c9ae09d0bd9000_rle_crop_3757789211_0.png.png imagette222826411744380001/1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783433_0.png.png imagette222826411744380001/1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782199_0.png.png imagette222826411744380001/1744379652_1870356_1351726519_c33435d400fb56eddfea136dd45d0ae3_rle_crop_3757788834_0.png.png imagette222826411744380001/1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783028_0.png.png imagette222826411744380001/1744379623_85212_1351728106_36707719a0197b9d73170b67ba33ae00_rle_crop_3757790220_0.png.png imagette222826411744380001/1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786549_0.png.png imagette222826411744380001/1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789102_0.png.png imagette222826421744380001/ wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/cb96e43e1072eedbc1fe9a3a6104500f_85619386.png imagette222826411744380001 22282642 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=22282642 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826421744380001 22282643 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=22282643 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351730365: '1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782201_0.png', 1351730366: '1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783039_0.png', 1351730505: '1744379592_1869870_1351728912_9a904d93e5714726c88034ec84291466_rle_crop_3757784956_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/69449a465ea37870430236de0510ead6_81900896.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/f588b5666f78116f3eb9e3b3a6d17acf_10137001.png change filename to text .imagette222826431744380001/ imagette222826431744380001/1744379592_1869870_1351728912_9a904d93e5714726c88034ec84291466_rle_crop_3757784956_0.png.png imagette222826431744380001/1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783039_0.png.png imagette222826431744380001/1744379531_1869316_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4_rle_crop_3757782201_0.png.png imagette222826441744380002/ imagette222826451744380002/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/038d99acd27a9b5442089a17a7284031_8546907.png imagette222826431744380001 22282644 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=22282644 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826441744380002 22282645 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=22282645 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826451744380002 22282638 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=22282638 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351730275: '1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783035_0.png', 1351730487: '1744379592_1869870_1351728912_9a904d93e5714726c88034ec84291466_rle_crop_3757784962_0.png', 1351731198: '1744379652_1870356_1351726725_456113b9fba450cf200735974893b1ff_rle_crop_3757786578_0.png', 1351731199: '1744379652_1870356_1351726519_c33435d400fb56eddfea136dd45d0ae3_rle_crop_3757788837_0.png', 1351731200: '1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789103_0.png', 1351732829: '1744379823_1872296_1351730454_8a688b931592fa0425da18783ef39a0e_rle_crop_3757801862_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/a2ed173b8215a7de25197220d7da8404_72028136.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/9dca8bb4559d354fe40088ecc56bc703_24425515.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/08555ea484313a436c7e69dca24ac616_59939677.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/30a74ea903eec2e62216df70d34c1c55_28251055.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/ca32fad7a8508917aab43c6a1111ea31_63680277.png change filename to text .imagette222826381744380002/ imagette222826381744380002/1744379652_1870356_1351726725_456113b9fba450cf200735974893b1ff_rle_crop_3757786578_0.png.png imagette222826381744380002/1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789103_0.png.png imagette222826381744380002/1744379531_1869316_1351728880_8d12d0c6a345c993b14909a17efcfc42_rle_crop_3757783035_0.png.png imagette222826381744380002/1744379823_1872296_1351730454_8a688b931592fa0425da18783ef39a0e_rle_crop_3757801862_0.png.png imagette222826381744380002/1744379652_1870356_1351726519_c33435d400fb56eddfea136dd45d0ae3_rle_crop_3757788837_0.png.png imagette222826381744380002/1744379592_1869870_1351728912_9a904d93e5714726c88034ec84291466_rle_crop_3757784962_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/07ee474147df2822591b083ae4196416_21702367.png imagette222826381744380002 22282646 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=22282646 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351730336: '1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783437_0.png', 1351731212: '1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786547_0.png', 1351731213: '1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789097_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/cda517bdab24ffbd2bee5348b73277db_78566868.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/18228546c357d33ec2e69cf4f9288a01_40645006.png change filename to text .imagette222826461744380002/ imagette222826461744380002/1744379652_1870356_1351726345_e79bc6e6bb90d7d4f483786ffce2726b_rle_crop_3757789097_0.png.png imagette222826461744380002/1744379652_1870356_1351727662_832da583a1f42a40958db391b034e814_rle_crop_3757786547_0.png.png imagette222826461744380002/1744379531_1869316_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed_rle_crop_3757783437_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/dce3c2e92f174feec10680f1a92d9313_16799905.png imagette222826461744380002 22282647 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=22282647 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1351732089: '1744379623_85212_1351728106_36707719a0197b9d73170b67ba33ae00_rle_crop_3757790225_0.png', 1351732093: '1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790330_0.png', 1351732097: '1744379623_85212_1351727882_7af174499e31d8cffeac57a6c29efd08_rle_crop_3757796307_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/2c296b2eacab0d9b34d4b53df9476117_76980861.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/e89ef3ad6ec94a0260e3b47132d7a0aa_10784885.png change filename to text .imagette222826471744380002/ imagette222826471744380002/1744379623_85212_1351727928_c241a1a9acdeff25c230ab2de1fc5893_rle_crop_3757790330_0.png.png imagette222826471744380002/1744379623_85212_1351727882_7af174499e31d8cffeac57a6c29efd08_rle_crop_3757796307_0.png.png imagette222826471744380002/1744379623_85212_1351728106_36707719a0197b9d73170b67ba33ae00_rle_crop_3757790225_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/74297c7743b0b1a5a608209b3a17b8ff_17810727.png imagette222826471744380002 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22282511 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22282648,22282649,22282650,22282651,22282652,22282653,22282654,22282655,22282656,22282657,22282658,22282659?tags=autre_refus,kraft,Teint_Dans_La_Masse,papier,environnement,cartonnette,flou,plastique,metal,mal_croppe,Carton_gris,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1351731589] : ('0.04347204790948178',) no score found for photo 1351731589 We are sending mail with results at report@fotonower.com args[1351731535] : ('0.04347204790948178',) no score found for photo 1351731535 We are sending mail with results at report@fotonower.com args[1351731485] : ('0.04347204790948178',) no score found for photo 1351731485 We are sending mail with results at report@fotonower.com args[1351731449] : ('0.04347204790948178',) no score found for photo 1351731449 We are sending mail with results at report@fotonower.com args[1351731263] : ('0.04347204790948178',) no score found for photo 1351731263 We are sending mail with results at report@fotonower.com args[1351731254] : ('0.04347204790948178',) no score found for photo 1351731254 We are sending mail with results at report@fotonower.com args[1351731247] : ('0.04347204790948178',) no score found for photo 1351731247 We are sending mail with results at report@fotonower.com args[1351731239] : ('0.04347204790948178',) no score found for photo 1351731239 We are sending mail with results at report@fotonower.com args[1351731234] : ('0.04347204790948178',) no score found for photo 1351731234 We are sending mail with results at report@fotonower.com refus_total : 0.04347204790948178 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=22282511 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_P22282511_11-04-2025_16_00_00.pdf results_Auto_P22282511_11-04-2025_16_00_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_16_00_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','22282511','results_Auto_P22282511_11-04-2025_16_00_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_16_00_00.pdf','pdf','','0.18','0.04347204790948178') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] map_info['map_portfolio_photo'] : {22282511: [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234, 1351731183, 1351731010, 1351730998, 1351730982, 1351730943, 1351730934, 1351730550, 1351730522, 1351730486, 1351730454, 1351730274, 1351730269, 1351730261, 1351730233, 1351730230, 1351730228, 1351729972, 1351729921, 1351729885, 1351729832, 1351729785, 1351729404, 1351729356, 1351729266, 1351729240, 1351729211, 1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] 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, '2745163') ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '22282511', '1351731589', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163')] time used for this insertion : 0.017960071563720703 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5954644680023193 time spend to save output : 0.01831364631652832 total time spend for step 4 : 3.6137781143188477 step5:split_time_score Fri Apr 11 16:00:04 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 : ['22282511'] 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 : [('22282511',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1351731589: {'path': 'temp/1744380000_601138_1351731589_cdccc45c4451d949cd868b537e2c7588.jpg', 'extension': 'jpg'}, 1351731485: {'path': 'temp/1744380000_601138_1351731485_fa04a3b7cf94d2b26f99c15c35770ef4.jpg', 'extension': 'jpg'}, 1351731535: {'path': 'temp/1744380000_601138_1351731535_d8709baf94134a061632b13a6d7a377c.jpg', 'extension': 'jpg'}, 1351731234: {'path': 'temp/1744380000_601138_1351731234_1253dbdcf91f148109d6138d727867cc.jpg', 'extension': 'jpg'}, 1351731239: {'path': 'temp/1744380000_601138_1351731239_07a73ad5c7ad1b67f9b9bab7a7948325.jpg', 'extension': 'jpg'}, 1351731263: {'path': 'temp/1744380000_601138_1351731263_9232f71104d230fc4fd7fc3f0afb8e5e.jpg', 'extension': 'jpg'}, 1351731449: {'path': 'temp/1744380000_601138_1351731449_2fe5394dd029f7b51db8f7b3c4016baa.jpg', 'extension': 'jpg'}, 1351731247: {'path': 'temp/1744380000_601138_1351731247_acb29a971b65f0fc2f2844d0c8fc7e41.jpg', 'extension': 'jpg'}, 1351731254: {'path': 'temp/1744380000_601138_1351731254_73b924f47e663c711114896db78f6b6f.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 = 22282511; (('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 = 22282511 group by h (('15', 57),) 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=22282511 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 (22282511) 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 (22282511) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11042025 22282511 Nombre de photos uploadées : 57 / 23040 (0%) 11042025 22282511 Nombre de photos taguées (types de déchets): 0 / 57 (0%) 11042025 22282511 Nombre de photos taguées (volume) : 0 / 57 (0%) [{'photo_id': 1351726725, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/456113b9fba450cf200735974893b1ff.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_24_10132.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1351726519, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/c33435d400fb56eddfea136dd45d0ae3.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_34_10150.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1351726345, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/e79bc6e6bb90d7d4f483786ffce2726b.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_44_10146.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1351727662, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/832da583a1f42a40958db391b034e814.jpg', 'username': None, 'uploaded_at': 1744379228, 'text': 'image_11042025_15_45_54_10140.jpg 4e-05 for time 1, id_amount 4 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 5.245208740234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.6927719116210938e-05 ????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0038695335388183594 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22282511, '2025-04-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1733453,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024355173110961914 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= 1733453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743814, 'mtr_portfolio_id': 22279715, 'dashboard_result_id': 10027879, '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_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743814, 'mtr_portfolio_id': 22280602, 'dashboard_result_id': 10027880, '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_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743814, 'mtr_portfolio_id': 22281285, 'dashboard_result_id': 10027881, '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_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743814, 'mtr_portfolio_id': 22282511, 'dashboard_result_id': 10027882, '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_P22282511_11-04-2025_15_57_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22282636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22282637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22282638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22282639, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22282640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22282641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22282642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22282643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22282644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22282645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22282646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22282647, '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 = 22279715 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': 2744985, 'mtr_portfolio_id': 22279715, 'created_at': datetime.datetime(2025, 4, 11, 15, 17, 31), 'result': '0.03821175810453171', 'result_long': None, 'result_double': None}] Qualite : 0.03821175810453171 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22279715 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22279715_11-04-2025_15_17_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22279715 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_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, 'pht': 3726}}" where mtr_portfolio_id = 22279715 and dashboard_run_id = 1743814 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`=22279715 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027879, 0.03821175810453171, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, '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 = 22280602 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': 2745057, 'mtr_portfolio_id': 22280602, 'created_at': datetime.datetime(2025, 4, 11, 15, 32, 59), 'result': '0.043907795476187256', 'result_long': None, 'result_double': None}] Qualite : 0.043907795476187256 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22280602 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22280602_11-04-2025_15_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22280602 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_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, 'pht': 3726}}" where mtr_portfolio_id = 22280602 and dashboard_run_id = 1743814 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`=22280602 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027880, 0.043907795476187256, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, '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 = 22281285 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': 2745109, 'mtr_portfolio_id': 22281285, 'created_at': datetime.datetime(2025, 4, 11, 15, 47, 45), 'result': '0.0634537798837013', 'result_long': None, 'result_double': None}] Qualite : 0.0634537798837013 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22281285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22281285_11-04-2025_15_47_46.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22281285 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_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, 'pht': 3726}}" where mtr_portfolio_id = 22281285 and dashboard_run_id = 1743814 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`=22281285 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027881, 0.0634537798837013, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, '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 = 22282511 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': 2745163, 'mtr_portfolio_id': 22282511, 'created_at': datetime.datetime(2025, 4, 11, 16, 0), 'result': '0.04347204790948178', 'result_long': None, 'result_double': None}] Qualite : 0.04347204790948178 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22282511 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_16_00_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22282511 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_P22282511_11-04-2025_16_00_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22282636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22282637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22282638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22282639, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22282640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22282641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22282642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22282643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22282644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22282645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22282646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22282647, 'pht': 3726}}" where mtr_portfolio_id = 22282511 and dashboard_run_id = 1743814 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`=22282511 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027882, 0.04347204790948178, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_16_00_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22282636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22282637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22282638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22282639, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22282640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22282641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22282642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22282643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22282644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22282645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22282646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22282647, '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 (22279715,22280602,22281285,22282511) result : ((1351699255,), (1351699282,), (1351699288,), (1351699527,), (1351699613,), (1351699739,), (1351699836,), (1351699865,), (1351700243,), (1351700276,), (1351700296,), (1351700311,), (1351700333,), (1351700667,), (1351700718,), (1351700755,), (1351700799,), (1351700878,), (1351700921,), (1351701412,), (1351701464,), (1351701510,), (1351701559,), (1351701815,), (1351701862,), (1351701911,), (1351701958,), (1351702010,), (1351702064,), (1351702690,), (1351702797,), (1351702917,), (1351703016,), (1351703274,), (1351703382,), (1351703474,), (1351703560,), (1351703604,), (1351703681,), (1351703949,), (1351704012,), (1351704047,), (1351704058,), (1351704086,), (1351704139,), (1351704408,), (1351704448,), (1351704510,), (1351704554,), (1351704978,), (1351705056,), (1351705111,), (1351705205,), (1351705258,), (1351705282,), (1351705451,), (1351705495,), (1351705555,), (1351705609,), (1351705641,), (1351705952,), (1351705999,), (1351706016,), (1351706574,), (1351706652,), (1351706728,), (1351706809,), (1351707243,), (1351707319,), (1351707380,), (1351708081,), (1351707864,), (1351707898,), (1351707932,), (1351707966,), (1351708010,), (1351708341,), (1351708368,), (1351708398,), (1351708422,), (1351708694,), (1351708723,), (1351708737,), (1351708766,), (1351708992,), (1351709038,), (1351709155,), (1351709203,), (1351709269,), (1351709443,), (1351709495,), (1351709580,), (1351709668,), (1351710080,), (1351710128,), (1351710158,), (1351710211,), (1351710250,), (1351710571,), (1351710601,), (1351710651,), (1351710683,), (1351710735,), (1351711120,), (1351711148,), (1351711198,), (1351711227,), (1351711262,), (1351711294,), (1351711536,), (1351711563,), (1351711652,), (1351711940,), (1351711989,), (1351712051,), (1351712110,), (1351712178,), (1351712651,), (1351712703,), (1351712781,), (1351712820,), (1351712859,), (1351712903,), (1351713031,), (1351713056,), (1351713083,), (1351713512,), (1351713588,), (1351713783,), (1351713821,), (1351713878,), (1351713946,), (1351714218,), (1351714265,), (1351714324,), (1351714393,), (1351714815,), (1351714854,), (1351714885,), (1351714912,), (1351716314,), (1351716081,), (1351716122,), (1351716165,), (1351716198,), (1351716253,), (1351716368,), (1351716400,), (1351716424,), (1351717288,), (1351717316,), (1351717424,), (1351717487,), (1351717552,), (1351718008,), (1351718061,), (1351718122,), (1351718144,), (1351718735,), (1351718757,), (1351718844,), (1351718937,), (1351719019,), (1351719948,), (1351720014,), (1351720052,), (1351720641,), (1351720655,), (1351720795,), (1351720873,), (1351720959,), (1351721011,), (1351721340,), (1351721387,), (1351721424,), (1351721460,), (1351721674,), (1351721685,), (1351721694,), (1351721722,), (1351722192,), (1351722252,), (1351722341,), (1351722403,), (1351722501,), (1351722610,), (1351723262,), (1351723442,), (1351723477,), (1351723512,), (1351723571,), (1351723636,), (1351723951,), (1351724000,), (1351724080,), (1351724115,), (1351724167,), (1351724358,), (1351724378,), (1351724405,), (1351724442,), (1351724472,), (1351724517,), (1351724690,), (1351725732,), (1351725780,), (1351725807,), (1351726814,), (1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,), (1351729211,), (1351729240,), (1351729266,), (1351729356,), (1351729404,), (1351729785,), (1351729832,), (1351729885,), (1351729921,), (1351729972,), (1351730228,), (1351730230,), (1351730233,), (1351730261,), (1351730269,), (1351730274,), (1351730454,), (1351730486,), (1351730522,), (1351730550,), (1351730934,), (1351730943,), (1351730982,), (1351730998,), (1351731010,), (1351731183,), (1351731234,), (1351731239,), (1351731247,), (1351731254,), (1351731263,), (1351731449,), (1351731485,), (1351731535,), (1351731589,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11042025': {'nb_upload': 57, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] map_info['map_portfolio_photo'] : {22282511: [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234, 1351731183, 1351731010, 1351730998, 1351730982, 1351730943, 1351730934, 1351730550, 1351730522, 1351730486, 1351730454, 1351730274, 1351730269, 1351730261, 1351730233, 1351730230, 1351730228, 1351729972, 1351729921, 1351729885, 1351729832, 1351729785, 1351729404, 1351729356, 1351729266, 1351729240, 1351729211, 1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : True mtd_id 4302 list_pids : [1351731589, 1351731535, 1351731485, 1351731449, 1351731263, 1351731254, 1351731247, 1351731239, 1351731234] Looping around the photos to save general results len do output : 1 /22282511Didn'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, '2745163') ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163') 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', None, '22282511', 'None', None, None, None, None, '2745163'), ('4302', '22282511', '1351731589', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731535', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731485', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731449', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731263', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731254', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731247', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731239', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351731234', None, None, None, None, None, '2745163')] time used for this insertion : 0.012317895889282227 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.37343645095825195 time spend to save output : 0.012561798095703125 total time spend for step 5 : 0.3859982490539551 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 (2745163) 2.26user 2.45system 0:08.73elapsed 54%CPU (0avgtext+0avgdata 158888maxresident)k 4032inputs+10544outputs (35major+72009minor)pagefaults 0swaps