python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 1092602 load datou : 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 ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4125088) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4125088) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942199 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4125088'] with mtr_portfolio_ids : ['28942199'] and first list_photo_ids : [] new path : /proc/1092602/ Name: python3 Umask: 0002 State: R (running) Tgid: 1092602 Ngid: 0 Pid: 1092602 PPid: 1092601 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1092602 NSpid: 1092602 NSpgid: 1091342 NSsid: 1091342 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98300 kB VmRSS: 98300 kB RssAnon: 59904 kB RssFile: 38396 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 45 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1092602', 'Ngid': '0', 'Pid': '1092602', 'PPid': '1092601', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1092602', 'NSpid': '1092602', 'NSpgid': '1091342', 'NSsid': '1091342', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98300 kB', 'VmRSS': '98300 kB', 'RssAnon': '59904 kB', 'RssFile': '38396 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '45', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '1092602', '1106908', '0', '1106884', '865636', '98300', b'', 'marlene', '4125088') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou 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 List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28942199) and hide_status = 0 ) AND ph.photo_id not in (SELECT mtr_photo_id from MTRPhoto.mtr_datou_result_search where mtr_current_id in (4125088 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28942199) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1396323709, 'portfolio_id': 28942199}, {'photo_id': 1396323698, 'portfolio_id': 28942199}, {'photo_id': 1396323667, 'portfolio_id': 28942199}, {'photo_id': 1396323665, 'portfolio_id': 28942199}, {'photo_id': 1396323570, 'portfolio_id': 28942199}, {'photo_id': 1396323111, 'portfolio_id': 28942199}, {'photo_id': 1396323088, 'portfolio_id': 28942199}, {'photo_id': 1396323086, 'portfolio_id': 28942199}, {'photo_id': 1396323084, 'portfolio_id': 28942199}, {'photo_id': 1396323061, 'portfolio_id': 28942199}, {'photo_id': 1396323058, 'portfolio_id': 28942199}, {'photo_id': 1396323019, 'portfolio_id': 28942199}, {'photo_id': 1396323018, 'portfolio_id': 28942199}, {'photo_id': 1396323017, 'portfolio_id': 28942199}, {'photo_id': 1396323010, 'portfolio_id': 28942199}, {'photo_id': 1396322851, 'portfolio_id': 28942199}, {'photo_id': 1396322822, 'portfolio_id': 28942199}, {'photo_id': 1396322788, 'portfolio_id': 28942199}, {'photo_id': 1396322759, 'portfolio_id': 28942199}, {'photo_id': 1396322727, 'portfolio_id': 28942199}, {'photo_id': 1396322584, 'portfolio_id': 28942199}, {'photo_id': 1396322582, 'portfolio_id': 28942199}, {'photo_id': 1396322580, 'portfolio_id': 28942199}, {'photo_id': 1396322574, 'portfolio_id': 28942199}, {'photo_id': 1396322565, 'portfolio_id': 28942199}, {'photo_id': 1396322546, 'portfolio_id': 28942199}, {'photo_id': 1396322545, 'portfolio_id': 28942199}, {'photo_id': 1396322517, 'portfolio_id': 28942199}, {'photo_id': 1396322493, 'portfolio_id': 28942199}, {'photo_id': 1396322490, 'portfolio_id': 28942199}, {'photo_id': 1396322487, 'portfolio_id': 28942199}, {'photo_id': 1396322485, 'portfolio_id': 28942199}, {'photo_id': 1396322477, 'portfolio_id': 28942199}, {'photo_id': 1396322474, 'portfolio_id': 28942199}, {'photo_id': 1396322471, 'portfolio_id': 28942199}, {'photo_id': 1396322469, 'portfolio_id': 28942199}, {'photo_id': 1396322467, 'portfolio_id': 28942199}, {'photo_id': 1396322466, 'portfolio_id': 28942199}, {'photo_id': 1396322354, 'portfolio_id': 28942199}, {'photo_id': 1396322322, 'portfolio_id': 28942199}, {'photo_id': 1396322319, 'portfolio_id': 28942199}, {'photo_id': 1396322317, 'portfolio_id': 28942199}, {'photo_id': 1396321744, 'portfolio_id': 28942199}, {'photo_id': 1396321736, 'portfolio_id': 28942199}, {'photo_id': 1396321728, 'portfolio_id': 28942199}, {'photo_id': 1396321726, 'portfolio_id': 28942199}, {'photo_id': 1396321725, 'portfolio_id': 28942199}, {'photo_id': 1396321713, 'portfolio_id': 28942199}, {'photo_id': 1396321710, 'portfolio_id': 28942199}, {'photo_id': 1396321706, 'portfolio_id': 28942199}, {'photo_id': 1396321704, 'portfolio_id': 28942199}, {'photo_id': 1396321703, 'portfolio_id': 28942199}, {'photo_id': 1396321702, 'portfolio_id': 28942199}, {'photo_id': 1396321671, 'portfolio_id': 28942199}, {'photo_id': 1396321668, 'portfolio_id': 28942199}, {'photo_id': 1396321666, 'portfolio_id': 28942199}, {'photo_id': 1396321660, 'portfolio_id': 28942199}, {'photo_id': 1396321627, 'portfolio_id': 28942199}, {'photo_id': 1396321625, 'portfolio_id': 28942199}, {'photo_id': 1396321623, 'portfolio_id': 28942199}, {'photo_id': 1396321622, 'portfolio_id': 28942199}, {'photo_id': 1396321621, 'portfolio_id': 28942199}, {'photo_id': 1396321455, 'portfolio_id': 28942199}, {'photo_id': 1396321420, 'portfolio_id': 28942199}, {'photo_id': 1396321389, 'portfolio_id': 28942199}, {'photo_id': 1396321359, 'portfolio_id': 28942199}, {'photo_id': 1396321325, 'portfolio_id': 28942199}] map_portfolio_id_photo_id: {28942199: [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084, 1396323061, 1396323058, 1396323019, 1396323018, 1396323017, 1396323010, 1396322851, 1396322822, 1396322788, 1396322759, 1396322727, 1396322584, 1396322582, 1396322580, 1396322574, 1396322565, 1396322546, 1396322545, 1396322517, 1396322493, 1396322490, 1396322487, 1396322485, 1396322477, 1396322474, 1396322471, 1396322469, 1396322467, 1396322466, 1396322354, 1396322322, 1396322319, 1396322317, 1396321744, 1396321736, 1396321728, 1396321726, 1396321725, 1396321713, 1396321710, 1396321706, 1396321704, 1396321703, 1396321702, 1396321671, 1396321668, 1396321666, 1396321660, 1396321627, 1396321625, 1396321623, 1396321622, 1396321621, 1396321455, 1396321420, 1396321389, 1396321359, 1396321325]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.019905805587768555 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Nov 27 00:32:57 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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28942199) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 28942199 get user id for portfolio 28942199 get sub ptf for main ptf 28942199, type 3726 and hashtags ['Carton_brun', 'cartonnette', 'Teint_Dans_La_Masse', 'mal_croppe', 'autre_refus', 'metal', 'flou', 'environnement', 'kraft', 'Carton_gris', 'papier', 'plastique'] 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`=28942199 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','cartonnette','Teint_Dans_La_Masse','mal_croppe','autre_refus','metal','flou','environnement','kraft','Carton_gris','papier','plastique')) 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`=28942199 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','cartonnette','Teint_Dans_La_Masse','mal_croppe','autre_refus','metal','flou','environnement','kraft','Carton_gris','papier','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28942199, 'sub_port_id': 28942207, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655930, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 28942199, 'sub_port_id': 28942208, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655931, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'environnement': {'main_port_id': 28942199, 'sub_port_id': 28942209, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655932, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'flou': {'main_port_id': 28942199, 'sub_port_id': 28942210, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655933, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'autre_refus': {'main_port_id': 28942199, 'sub_port_id': 28942211, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655934, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'Carton_brun': {'main_port_id': 28942199, 'sub_port_id': 28942212, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655935, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'kraft': {'main_port_id': 28942199, 'sub_port_id': 28942213, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655936, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'plastique': {'main_port_id': 28942199, 'sub_port_id': 28942214, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655937, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'metal': {'main_port_id': 28942199, 'sub_port_id': 28942215, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655938, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'papier': {'main_port_id': 28942199, 'sub_port_id': 28942216, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655939, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'Carton_gris': {'main_port_id': 28942199, 'sub_port_id': 28942217, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655940, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}, 'mal_croppe': {'main_port_id': 28942199, 'sub_port_id': 28942218, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655941, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28942207 , 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=28942199 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 (28942207) result : ((1396322462,), (1396322571,), (1396322572,), (1396322573,), (1396323034,), (1396323035,), (1396323053,), (1396323054,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942208 , 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=28942199 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='Teint_Dans_La_Masse' 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 (28942208) result : ((1396321731,), (1396321732,), (1396321733,), (1396321734,), (1396321735,), (1396321737,), (1396322502,), (1396322557,), (1396322558,), (1396322559,), (1396322561,), (1396322562,), (1396322563,), (1396322564,), (1396322589,), (1396322590,), (1396322592,), (1396322593,), (1396323022,), (1396323023,), (1396323024,), (1396323025,), (1396323026,), (1396323027,), (1396323028,), (1396323047,), (1396323048,), (1396323049,), (1396323050,), (1396323051,), (1396323052,), (1396323074,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942209 , 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=28942199 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 (28942209) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942210 , 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=28942199 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 (28942210) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942211 , 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=28942199 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942211) result : ((1396322566,), (1396322567,), (1396322594,), (1396323030,), (1396323075,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942212 , 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=28942199 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 (28942212) result : ((1396322463,), (1396322464,), (1396322465,), (1396322576,), (1396322577,), (1396322578,), (1396322597,), (1396323036,), (1396323037,), (1396323039,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942213 , 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=28942199 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942213) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942214 , 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=28942199 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 (28942214) result : ((1396321741,), (1396322579,), (1396322598,), (1396322599,), (1396323041,), (1396323042,), (1396323043,), (1396323044,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942215 , 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=28942199 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 (28942215) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942216 , 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=28942199 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942216) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942217 , 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=28942199 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 (28942217) result : ((1396321738,), (1396321739,), (1396321740,), (1396322568,), (1396322569,), (1396322570,), (1396322595,), (1396323032,), (1396323033,), (1396323076,), (1396323077,), (1396323078,), (1396323079,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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 28942218 , 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=28942199 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 (28942218) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28942199) result : ((1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,)) 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`=28942199 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','cartonnette','Teint_Dans_La_Masse','mal_croppe','autre_refus','metal','flou','environnement','kraft','Carton_gris','papier','plastique')) 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`=28942199 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','cartonnette','Teint_Dans_La_Masse','mal_croppe','autre_refus','metal','flou','environnement','kraft','Carton_gris','papier','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28942199, 'sub_port_id': 28942219, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655942, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 28942199, 'sub_port_id': 28942220, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655943, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'environnement': {'main_port_id': 28942199, 'sub_port_id': 28942221, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655944, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'flou': {'main_port_id': 28942199, 'sub_port_id': 28942222, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655945, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'autre_refus': {'main_port_id': 28942199, 'sub_port_id': 28942223, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655946, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'Carton_brun': {'main_port_id': 28942199, 'sub_port_id': 28942224, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655947, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'kraft': {'main_port_id': 28942199, 'sub_port_id': 28942225, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655948, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'plastique': {'main_port_id': 28942199, 'sub_port_id': 28942226, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655949, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'metal': {'main_port_id': 28942199, 'sub_port_id': 28942227, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655950, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'papier': {'main_port_id': 28942199, 'sub_port_id': 28942228, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655951, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'Carton_gris': {'main_port_id': 28942199, 'sub_port_id': 28942229, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655952, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}, 'mal_croppe': {'main_port_id': 28942199, 'sub_port_id': 28942230, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19655953, 'last_updated_at': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 27, 0, 30, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 27, 0, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942219,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942207 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942220,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942208 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942221,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942209 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942222,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942210 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942223,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942211 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942224,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942212 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942225,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942213 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942226,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942214 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942227,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942215 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942228,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942216 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942229,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942217 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28942230,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28942218 lien utilise dans velours : https://marlene.fotonower.com/velours/28942219,28942220,28942221,28942222,28942223,28942224,28942225,28942226,28942227,28942228,28942229,28942230?tags=cartonnette,Teint_Dans_La_Masse,environnement,flou,autre_refus,Carton_brun,kraft,plastique,metal,papier,Carton_gris,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28942199]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] map_info['map_portfolio_photo'] : {28942199: [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084, 1396323061, 1396323058, 1396323019, 1396323018, 1396323017, 1396323010, 1396322851, 1396322822, 1396322788, 1396322759, 1396322727, 1396322584, 1396322582, 1396322580, 1396322574, 1396322565, 1396322546, 1396322545, 1396322517, 1396322493, 1396322490, 1396322487, 1396322485, 1396322477, 1396322474, 1396322471, 1396322469, 1396322467, 1396322466, 1396322354, 1396322322, 1396322319, 1396322317, 1396321744, 1396321736, 1396321728, 1396321726, 1396321725, 1396321713, 1396321710, 1396321706, 1396321704, 1396321703, 1396321702, 1396321671, 1396321668, 1396321666, 1396321660, 1396321627, 1396321625, 1396321623, 1396321622, 1396321621, 1396321455, 1396321420, 1396321389, 1396321359, 1396321325]} final : False mtd_id 4302 list_pids : [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] Looping around the photos to save general results len do output : 1 /28942199. 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, '4125088') ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088') 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, '28942199', "{'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218}", None, None, None, None, '4125088'), ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088')] time used for this insertion : 0.017387866973876953 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8490080833435059 time spend to save output : 0.01771259307861328 total time spend for step 1 : 1.8667206764221191 step2:final Thu Nov 27 00:32:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28942199) 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 28942199 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1396321455,1396321420,1396321389,1396321359,1396321325,1396321627,1396321625,1396321623,1396321622,1396321621,1396321671,1396321668,1396321666,1396321660,1396321713,1396321710,1396321706,1396321704,1396321703,1396321702,1396321744,1396321736,1396321728,1396321726,1396321725,1396322354,1396322322,1396322319,1396322317,1396322477,1396322474,1396322471,1396322469,1396322467,1396322466,1396322493,1396322490,1396322487,1396322485,1396322517,1396322546,1396322545,1396322584,1396322582,1396322580,1396322574,1396322565,1396322851,1396322822,1396322788,1396322759,1396322727,1396323019,1396323018,1396323017,1396323010,1396323061,1396323058,1396323709,1396323111,1396323088,1396323698,1396323086,1396323667,1396323665,1396323084,1396323570); 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([28942199]) Inside saveOutput : final : False verbose : True original output for save of step final : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} new output for save of step final : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] map_info['map_portfolio_photo'] : {28942199: [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084, 1396323061, 1396323058, 1396323019, 1396323018, 1396323017, 1396323010, 1396322851, 1396322822, 1396322788, 1396322759, 1396322727, 1396322584, 1396322582, 1396322580, 1396322574, 1396322565, 1396322546, 1396322545, 1396322517, 1396322493, 1396322490, 1396322487, 1396322485, 1396322477, 1396322474, 1396322471, 1396322469, 1396322467, 1396322466, 1396322354, 1396322322, 1396322319, 1396322317, 1396321744, 1396321736, 1396321728, 1396321726, 1396321725, 1396321713, 1396321710, 1396321706, 1396321704, 1396321703, 1396321702, 1396321671, 1396321668, 1396321666, 1396321660, 1396321627, 1396321625, 1396321623, 1396321622, 1396321621, 1396321455, 1396321420, 1396321389, 1396321359, 1396321325]} final : False mtd_id 4302 list_pids : [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] Looping around the photos to save general results len do output : 9 /1396323709.Didn't retrieve data . /1396323698.Didn't retrieve data . /1396323667.Didn't retrieve data . /1396323665.Didn't retrieve data . /1396323570.Didn't retrieve data . /1396323111.Didn't retrieve data . /1396323088.Didn't retrieve data . /1396323086.Didn't retrieve data . /1396323084.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, '4125088') ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088') 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', '28942199', '1396323709', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323698', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323667', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323665', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323570', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323111', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323088', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323086', '0.057228503797150936', None, None, None, None, '4125088'), ('4302', '28942199', '1396323084', '0.057228503797150936', None, None, None, None, '4125088')] time used for this insertion : 0.016165733337402344 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08302807807922363 time spend to save output : 0.016680240631103516 total time spend for step 2 : 0.09970831871032715 step3:velours_tree Thu Nov 27 00:32:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28942199: [{'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218}]} input_args_next_step : {28942199: ()} output_args : {28942199: [{'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218}]} args : 28942199 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 : ({'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28942199) 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([28942199]) 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.30760908126831055 time spend to save output : 4.9591064453125e-05 total time spend for step 3 : 0.30765867233276367 step4:send_mail_cod Thu Nov 27 00:32:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} input_args_next_step : {1396323709: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323709 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323698 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323667 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323665 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323570 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323111 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323088 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323086 depend.output_id : 0 input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ()} output_args : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',)} args : 1396323084 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 : {28942199: [{'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218}]} input_args_next_step : {1396323709: ('0.057228503797150936',), 1396323698: ('0.057228503797150936',), 1396323667: ('0.057228503797150936',), 1396323665: ('0.057228503797150936',), 1396323570: ('0.057228503797150936',), 1396323111: ('0.057228503797150936',), 1396323088: ('0.057228503797150936',), 1396323086: ('0.057228503797150936',), 1396323084: ('0.057228503797150936',), 28942199: ()} output_args : {28942199: [{'cartonnette': 28942207, 'Teint_Dans_La_Masse': 28942208, 'environnement': 28942209, 'flou': 28942210, 'autre_refus': 28942211, 'Carton_brun': 28942212, 'kraft': 28942213, 'plastique': 28942214, 'metal': 28942215, 'papier': 28942216, 'Carton_gris': 28942217, 'mal_croppe': 28942218}]} args : 28942199 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.057228503797150936',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28942199) 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_view ph WHERE photo_id IN (1396323709,1396323698,1396323667,1396323665,1396323570,1396323111,1396323088,1396323086,1396323084) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1396323084 begin to download photo : 1396323088 begin to download photo : 1396323667 begin to download photo : 1396323570 begin to download photo : 1396323709 download finish for photo 1396323709 download finish for photo 1396323088 begin to download photo : 1396323111 download finish for photo 1396323667 begin to download photo : 1396323698 download finish for photo 1396323084 begin to download photo : 1396323086 download finish for photo 1396323570 begin to download photo : 1396323665 download finish for photo 1396323111 download finish for photo 1396323698 download finish for photo 1396323086 download finish for photo 1396323665 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_P28942199_27-11-2025_00_33_00.pdf 28942207 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942207 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396322462: '1764199286_2007320_1396321725_9e82d299533cdd84409c058a58a2e64e_rle_crop_4046697269_0.png', 1396322571: '1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702147_0.png', 1396322572: '1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702150_0.png', 1396322573: '1764199506_2012924_1396321706_b27ec363eec6307ddd5035163011d0d3_rle_crop_4046702762_0.png', 1396323034: '1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705292_0.png', 1396323035: '1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705328_0.png', 1396323053: '1764199644_2016376_1396321627_8905b85416d31c15b2fe47af9f1dea70_rle_crop_4046705358_0.png', 1396323054: '1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705420_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/85c740b8362d4a0ddff6219fe2323e82_53631169.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/0a8e3a4ecf91038003b30a3ca8875807_22775952.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/ba5117521057fafdcc2a7dba8961e33f_91751868.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/914af75fe2fd4e7988d91cb16657d10b_53147021.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/62f9deeee94d1204a8fbff26e25dab16_15523298.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/dd99760e39db091e90d1adb7ef1f3245_33541459.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/a8f565ec984344ed74c57067f654988a_88114805.png change filename to text .imagette289422071764199980/ imagette289422071764199980/1764199644_2016376_1396321627_8905b85416d31c15b2fe47af9f1dea70_rle_crop_4046705358_0.png.png imagette289422071764199980/1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702147_0.png.png imagette289422071764199980/1764199506_2012924_1396321706_b27ec363eec6307ddd5035163011d0d3_rle_crop_4046702762_0.png.png imagette289422071764199980/1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705420_0.png.png imagette289422071764199980/1764199286_2007320_1396321725_9e82d299533cdd84409c058a58a2e64e_rle_crop_4046697269_0.png.png imagette289422071764199980/1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702150_0.png.png imagette289422071764199980/1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705292_0.png.png imagette289422071764199980/1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705328_0.png.png imagette289422101764199980/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/92924ed267553c2624d0e17730e9d918_26873145.png imagette289422071764199980 28942210 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942210 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette289422101764199980 28942211 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942211 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396322566: '1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702149_0.png', 1396322567: '1764199506_2012924_1396321704_f07d44ddfe4329cc5043c9d32d5690f1_rle_crop_4046702790_0.png', 1396322594: '1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703716_0.png', 1396323030: '1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705265_0.png', 1396323075: '1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708418_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/4a1167335b2a276c12f1888bd7d07a8a_43244928.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/beaefbb0515b0992680379f2dd67104a_59638239.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/cc5942cf80690e4b3f482dee9940ead9_54916370.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/aa9f434661116919dd5ee3bb1608a74e_52106988.png change filename to text .imagette289422111764199980/ imagette289422111764199980/1764199506_2012924_1396321704_f07d44ddfe4329cc5043c9d32d5690f1_rle_crop_4046702790_0.png.png imagette289422111764199980/1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703716_0.png.png imagette289422111764199980/1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705265_0.png.png imagette289422111764199980/1764199506_2012924_1396321744_0e96590cce0cb1798332934f22966839_rle_crop_4046702149_0.png.png imagette289422111764199980/1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708418_0.png.png imagette289422131764199981/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/41c34241001892c61092536564be6383_84802367.png imagette289422111764199980 28942213 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942213 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette289422131764199981 28942214 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942214 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396321741: '1764199165_2003896_1396321621_f19b64bb70a35fef2fc024c905512d46_rle_crop_4046697044_0.png', 1396322579: '1764199506_2012924_1396321703_ec57481fae8b47fc740070fb8ac7c201_rle_crop_4046702802_0.png', 1396322598: '1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703715_0.png', 1396322599: '1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703738_0.png', 1396323041: '1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705288_0.png', 1396323042: '1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705302_0.png', 1396323043: '1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705323_0.png', 1396323044: '1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705336_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/b117dc545931f09e5455e750b61a6e9e_26728728.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/963ef38e2a4bc1d449c00648a83f3270_61544304.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/9e0754a1494f876438c5c485707126d7_82088798.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/35b83097c5b501ce97e16d12f4282a67_95554493.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/824980790dd0278d67aba1896c4361c4_85722859.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/852116f124db677db08256e891ce3a4d_64118609.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/0217f83753cde2e6a7c11f90967f61f6_99459838.png change filename to text .imagette289422141764199981/ imagette289422141764199981/1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705302_0.png.png imagette289422141764199981/1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703738_0.png.png imagette289422141764199981/1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705336_0.png.png imagette289422141764199981/1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705288_0.png.png imagette289422141764199981/1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705323_0.png.png imagette289422141764199981/1764199165_2003896_1396321621_f19b64bb70a35fef2fc024c905512d46_rle_crop_4046697044_0.png.png imagette289422141764199981/1764199506_2012924_1396321703_ec57481fae8b47fc740070fb8ac7c201_rle_crop_4046702802_0.png.png imagette289422141764199981/1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703715_0.png.png imagette289422151764199981/ imagette289422181764199981/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/ef4a196609156d347912f4b13306adae_21625211.png imagette289422141764199981 28942215 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942215 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette289422151764199981 28942218 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942218 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette289422181764199981 28942208 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942208 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396322592: '1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703734_0.png', 1396323074: '1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708413_0.png', 1396323052: '1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705429_0.png', 1396323051: '1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705424_0.png', 1396323050: '1764199644_2016376_1396321359_5752c524e60846accae80c71dda3aeb3_rle_crop_4046705409_0.png', 1396323049: '1764199644_2016376_1396321389_412f2f27ad88b7de9f6da79e53482a45_rle_crop_4046705390_0.png', 1396323048: '1764199644_2016376_1396321389_412f2f27ad88b7de9f6da79e53482a45_rle_crop_4046705392_0.png', 1396323047: '1764199644_2016376_1396321420_f7e2d9e530d67b29d0d1119ca8b6ba93_rle_crop_4046705379_0.png', 1396323028: '1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705347_0.png', 1396323027: '1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705345_0.png', 1396323026: '1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705348_0.png', 1396323025: '1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705324_0.png', 1396323024: '1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705331_0.png', 1396323023: '1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705309_0.png', 1396323022: '1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705264_0.png', 1396322593: '1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703741_0.png', 1396321731: '1764199165_2003896_1396321623_b783657340155e6bab8df046fb177876_rle_crop_4046697010_0.png', 1396322590: '1764199527_2013354_1396322490_b30702e8cd77e4637576c2b2cf0db564_rle_crop_4046703700_0.png', 1396322589: '1764199527_2013354_1396322490_b30702e8cd77e4637576c2b2cf0db564_rle_crop_4046703705_0.png', 1396322564: '1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703402_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/08a36cfea21a40a8a68dd3b4b059ba69_97087430.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/6e02d1d1f7b871388dd5212b6a4db320_47510025.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/18db0c8527cc813db108e5e112e5b392_38534771.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/1e731e1a12f81363952f213e3f3e5956_39234034.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/9c250741f0909fe7fa6fa4de79132025_8848023.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/843acd91c6402b9b2a567f37ef0b6dd6_93806428.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/4ddefea3574445b0f8a99824f6334ff7_2793262.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/2ad35fcd33d4bcbf6fc9efa726b8033d_12455931.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/29067c9f6b6794ed879ce9d7ac0bd10b_62946871.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/7d16d91ff6cc519d087394f0e7725fe8_79042287.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/bdb4753494124684fb7d4fbdc96e743c_40478223.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/117f6c91da78fd8c8a4578aa0f030ad2_6140475.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/4da43ee294baa45d651b13544979565f_83788956.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/05b12eb8efaa51d52517122fc41dc286_42251762.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/36d1e450011f623e45a975bff9440261_36572359.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/7954c01d916c344a163b7dbcd092ab1c_56675361.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/e2fe0c942f2ff5acf3212e8a5abea0d4_55927063.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/d756394d60de6337a031c39f22ce68dd_70286731.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/624c4f55b94e7d9e4c65242905a40a19_40456276.png change filename to text .imagette289422081764199981/ imagette289422081764199981/1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703734_0.png.png imagette289422081764199981/1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705424_0.png.png imagette289422081764199981/1764199644_2016376_1396321325_de97f650693763e8a50dd1f47bd1efef_rle_crop_4046705429_0.png.png imagette289422081764199981/1764199527_2013354_1396322490_b30702e8cd77e4637576c2b2cf0db564_rle_crop_4046703705_0.png.png imagette289422081764199981/1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703741_0.png.png imagette289422081764199981/1764199644_2016376_1396321420_f7e2d9e530d67b29d0d1119ca8b6ba93_rle_crop_4046705379_0.png.png imagette289422081764199981/1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705348_0.png.png imagette289422081764199981/1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703402_0.png.png imagette289422081764199981/1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705324_0.png.png imagette289422081764199981/1764199644_2016376_1396321389_412f2f27ad88b7de9f6da79e53482a45_rle_crop_4046705392_0.png.png imagette289422081764199981/1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705347_0.png.png imagette289422081764199981/1764199644_2016376_1396321359_5752c524e60846accae80c71dda3aeb3_rle_crop_4046705409_0.png.png imagette289422081764199981/1764199527_2013354_1396322490_b30702e8cd77e4637576c2b2cf0db564_rle_crop_4046703700_0.png.png imagette289422081764199981/1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708413_0.png.png imagette289422081764199981/1764199626_2015961_1396322467_58fa459418d02a46464769b5db617d0f_rle_crop_4046705331_0.png.png imagette289422081764199981/1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705309_0.png.png imagette289422081764199981/1764199626_2015961_1396322466_b074dcf184874e64301da26b9d2a23ba_rle_crop_4046705345_0.png.png imagette289422081764199981/1764199165_2003896_1396321623_b783657340155e6bab8df046fb177876_rle_crop_4046697010_0.png.png imagette289422081764199981/1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705264_0.png.png imagette289422081764199981/1764199644_2016376_1396321389_412f2f27ad88b7de9f6da79e53482a45_rle_crop_4046705390_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/9c08d6d654c6fc8a3a050df29fc0bdbd_84977856.png imagette289422081764199981 28942212 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942212 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396322463: '1764199286_2007320_1396321736_fc472270a6bfccea507390d238c98278_rle_crop_4046697231_0.png', 1396322464: '1764199286_2007320_1396321726_09e4be8c34ca180284e1e5ca00205ee5_rle_crop_4046697260_0.png', 1396322465: '1764199286_2007320_1396321726_09e4be8c34ca180284e1e5ca00205ee5_rle_crop_4046697256_0.png', 1396322576: '1764199506_2012924_1396321710_5012be65591a18e66440f5370ba65cdf_rle_crop_4046702177_0.png', 1396322577: '1764199506_2012924_1396321703_ec57481fae8b47fc740070fb8ac7c201_rle_crop_4046702798_0.png', 1396322578: '1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703397_0.png', 1396322597: '1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703718_0.png', 1396323036: '1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705261_0.png', 1396323037: '1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705289_0.png', 1396323039: '1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705303_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/f8ca54ca065a05d258d41ec9484d1f30_18507680.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/83c3836b7a13d8a2e1a80ef83acea68d_29303450.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/acf5798472b2c3e6fb4b0c6c3fc54143_97392256.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/7001a3380c3d1979ea745ab365bfa470_64914554.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/302d97e277f8dd3d486077c77f502f8a_71707739.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/57e3fe60ab3baa223f8d73e13b6e578c_14834189.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/9376fcb31ed0091457072a8d43193e27_29920555.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/50ba3d99007cfc85778bf46e0e3c64b7_69690263.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/4d3b95dc9f2f61b6de5d4d88f14176ce_79458647.png change filename to text .imagette289422121764199983/ imagette289422121764199983/1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703397_0.png.png imagette289422121764199983/1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705261_0.png.png imagette289422121764199983/1764199506_2012924_1396321703_ec57481fae8b47fc740070fb8ac7c201_rle_crop_4046702798_0.png.png imagette289422121764199983/1764199286_2007320_1396321726_09e4be8c34ca180284e1e5ca00205ee5_rle_crop_4046697260_0.png.png imagette289422121764199983/1764199626_2015961_1396322471_405bc27ceeb9bfe078b61a1580f3c42d_rle_crop_4046705289_0.png.png imagette289422121764199983/1764199286_2007320_1396321736_fc472270a6bfccea507390d238c98278_rle_crop_4046697231_0.png.png imagette289422121764199983/1764199286_2007320_1396321726_09e4be8c34ca180284e1e5ca00205ee5_rle_crop_4046697256_0.png.png imagette289422121764199983/1764199626_2015961_1396322469_206624b2fd52abfb8fae953f13d05f7a_rle_crop_4046705303_0.png.png imagette289422121764199983/1764199527_2013354_1396322487_00c7799caccb2634da5a593c6a4ac3eb_rle_crop_4046703718_0.png.png imagette289422121764199983/1764199506_2012924_1396321710_5012be65591a18e66440f5370ba65cdf_rle_crop_4046702177_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/2a93c3c9370a5cdb555b8c470901a888_19927200.png imagette289422121764199983 28942217 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942217 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1396321738: '1764199165_2003896_1396321623_b783657340155e6bab8df046fb177876_rle_crop_4046697013_0.png', 1396321739: '1764199165_2003896_1396321622_6b09e0fd8af0c54d65f162f0846e6a5f_rle_crop_4046697024_0.png', 1396321740: '1764199165_2003896_1396321622_6b09e0fd8af0c54d65f162f0846e6a5f_rle_crop_4046697021_0.png', 1396322568: '1764199506_2012924_1396321706_b27ec363eec6307ddd5035163011d0d3_rle_crop_4046702769_0.png', 1396322569: '1764199506_2012924_1396321704_f07d44ddfe4329cc5043c9d32d5690f1_rle_crop_4046702786_0.png', 1396322570: '1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703399_0.png', 1396322595: '1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703733_0.png', 1396323032: '1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705254_0.png', 1396323033: '1764199626_2015961_1396322474_5c134c28f85d527cf81ed07330708385_rle_crop_4046705272_0.png', 1396323076: '1764199767_2021729_1396323018_fc810dadaf9bbe041f029ce2bde7dfbd_rle_crop_4046708387_0.png', 1396323077: '1764199767_2021729_1396323018_fc810dadaf9bbe041f029ce2bde7dfbd_rle_crop_4046708388_0.png', 1396323078: '1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708412_0.png', 1396323079: '1764199767_2021729_1396323010_00b9f6c63625e10f13c6cf7b17bf66f7_rle_crop_4046708436_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/efbc4a13883e3ab21f640c2207b49ab4_42307503.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/6aaed3b8c08e6081fa94ed17f9d47c1a_48011852.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/b58ae444e582cab81fc06dbee3fd8b3b_82484564.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/ec6d87fe767ca8f145fc9d320bc1ba09_20834864.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/3ecbf988633b5c595d9f7881297c519d_40474221.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/4a35d4fe4bdfa7c80cf0578fc7e38177_895825.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/7e7655c420dc0f32a354f141231b8744_28392655.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/a71c523de6b9baac8ce43ce817a73520_64812798.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/f1a38e30458ec2f13a13016ed39f734a_41162883.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/0a53c747723f1b91e102b2737ff0641b_37097484.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/b8b4f266dc4b085254251af735c53801_99308026.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/33bee8074410f79bc23753765642baee_79898231.png change filename to text .imagette289422171764199984/ imagette289422171764199984/1764199165_2003896_1396321622_6b09e0fd8af0c54d65f162f0846e6a5f_rle_crop_4046697021_0.png.png imagette289422171764199984/1764199767_2021729_1396323017_290be58c24bfe80bfb3d9962243514a3_rle_crop_4046708412_0.png.png imagette289422171764199984/1764199506_2012924_1396321702_42a06a61edd6bace46b961a5c5eed80b_rle_crop_4046703399_0.png.png imagette289422171764199984/1764199506_2012924_1396321706_b27ec363eec6307ddd5035163011d0d3_rle_crop_4046702769_0.png.png imagette289422171764199984/1764199626_2015961_1396322474_5c134c28f85d527cf81ed07330708385_rle_crop_4046705272_0.png.png imagette289422171764199984/1764199506_2012924_1396321704_f07d44ddfe4329cc5043c9d32d5690f1_rle_crop_4046702786_0.png.png imagette289422171764199984/1764199165_2003896_1396321623_b783657340155e6bab8df046fb177876_rle_crop_4046697013_0.png.png imagette289422171764199984/1764199527_2013354_1396322485_1c2eb9bc6b6953ca388e5ff1d0927c11_rle_crop_4046703733_0.png.png imagette289422171764199984/1764199767_2021729_1396323018_fc810dadaf9bbe041f029ce2bde7dfbd_rle_crop_4046708387_0.png.png imagette289422171764199984/1764199165_2003896_1396321622_6b09e0fd8af0c54d65f162f0846e6a5f_rle_crop_4046697024_0.png.png imagette289422171764199984/1764199626_2015961_1396322493_54f8257531405c9d13ae74a7fcfa36fb_rle_crop_4046705254_0.png.png imagette289422171764199984/1764199767_2021729_1396323010_00b9f6c63625e10f13c6cf7b17bf66f7_rle_crop_4046708436_0.png.png imagette289422171764199984/1764199767_2021729_1396323018_fc810dadaf9bbe041f029ce2bde7dfbd_rle_crop_4046708388_0.png.png wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/c31b3e6b41e71dbd644d1f15c2b308c4_49479822.png imagette289422171764199984 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28942199 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28942219,28942220,28942221,28942222,28942223,28942224,28942225,28942226,28942227,28942228,28942229,28942230?tags=cartonnette,Teint_Dans_La_Masse,environnement,flou,autre_refus,Carton_brun,kraft,plastique,metal,papier,Carton_gris,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1396323709] : ('0.057228503797150936',) no score found for photo 1396323709 We are sending mail with results at report@fotonower.com args[1396323698] : ('0.057228503797150936',) no score found for photo 1396323698 We are sending mail with results at report@fotonower.com args[1396323667] : ('0.057228503797150936',) no score found for photo 1396323667 We are sending mail with results at report@fotonower.com args[1396323665] : ('0.057228503797150936',) no score found for photo 1396323665 We are sending mail with results at report@fotonower.com args[1396323570] : ('0.057228503797150936',) no score found for photo 1396323570 We are sending mail with results at report@fotonower.com args[1396323111] : ('0.057228503797150936',) no score found for photo 1396323111 We are sending mail with results at report@fotonower.com args[1396323088] : ('0.057228503797150936',) no score found for photo 1396323088 We are sending mail with results at report@fotonower.com args[1396323086] : ('0.057228503797150936',) no score found for photo 1396323086 We are sending mail with results at report@fotonower.com args[1396323084] : ('0.057228503797150936',) no score found for photo 1396323084 We are sending mail with results at report@fotonower.com refus_total : 0.057228503797150936 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942199 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_P28942199_27-11-2025_00_33_00.pdf results_Auto_P28942199_27-11-2025_00_33_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28942199_27-11-2025_00_33_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','28942199','results_Auto_P28942199_27-11-2025_00_33_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28942199_27-11-2025_00_33_00.pdf','pdf','','0.27','0.057228503797150936') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28942199]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] map_info['map_portfolio_photo'] : {28942199: [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084, 1396323061, 1396323058, 1396323019, 1396323018, 1396323017, 1396323010, 1396322851, 1396322822, 1396322788, 1396322759, 1396322727, 1396322584, 1396322582, 1396322580, 1396322574, 1396322565, 1396322546, 1396322545, 1396322517, 1396322493, 1396322490, 1396322487, 1396322485, 1396322477, 1396322474, 1396322471, 1396322469, 1396322467, 1396322466, 1396322354, 1396322322, 1396322319, 1396322317, 1396321744, 1396321736, 1396321728, 1396321726, 1396321725, 1396321713, 1396321710, 1396321706, 1396321704, 1396321703, 1396321702, 1396321671, 1396321668, 1396321666, 1396321660, 1396321627, 1396321625, 1396321623, 1396321622, 1396321621, 1396321455, 1396321420, 1396321389, 1396321359, 1396321325]} final : False mtd_id 4302 list_pids : [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] 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, '4125088') ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088') 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', '28942199', '1396323709', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088')] time used for this insertion : 0.015836238861083984 save_final save missing photos in datou_result : time spend for datou_step_exec : 6.665599584579468 time spend to save output : 0.016048192977905273 total time spend for step 4 : 6.681647777557373 step5:split_time_score Thu Nov 27 00:33:06 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 : ['28942199'] 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 : [('28942199',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28942199) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1396323709: {'path': 'temp/1764199979_1092602_1396323709_4a68a9154dc2e831f492784105f9f56d.jpg', 'extension': 'jpg'}, 1396323088: {'path': 'temp/1764199979_1092602_1396323088_ecd9c4f21edfe7d24afb67160c347b39.jpg', 'extension': 'jpg'}, 1396323111: {'path': 'temp/1764199979_1092602_1396323111_a28c1d3644e371fafca90baf1224e5c6.jpg', 'extension': 'jpg'}, 1396323667: {'path': 'temp/1764199979_1092602_1396323667_3d223c3a1caa799b7f9c6d4319e8c4bd.jpg', 'extension': 'jpg'}, 1396323698: {'path': 'temp/1764199979_1092602_1396323698_9a539bab8b6f5d05dc9c63b26c3a4abd.jpg', 'extension': 'jpg'}, 1396323084: {'path': 'temp/1764199979_1092602_1396323084_ce27ccbd793d96d886854569a0edf14b.jpg', 'extension': 'jpg'}, 1396323086: {'path': 'temp/1764199979_1092602_1396323086_8883cd2041f80203f344e9815bbcd237.jpg', 'extension': 'jpg'}, 1396323570: {'path': 'temp/1764199979_1092602_1396323570_0ef7a8fe82b8e9c407c1d4aca5c3908f.jpg', 'extension': 'jpg'}, 1396323665: {'path': 'temp/1764199979_1092602_1396323665_8ae8af7d20fe7e59433b69c9ac1edec0.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 = 28942199; (('arc_en_ciel_jrm_live',),) 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_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28942199 group by h (('00', 67),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28942199 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 (28942199) 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 (28942199) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 27112025 28942199 Nombre de photos uploadées : 67 / 23040 (0%) 27112025 28942199 Nombre de photos taguées (types de déchets): 0 / 67 (0%) 27112025 28942199 Nombre de photos taguées (volume) : 0 / 67 (0%) [{'photo_id': 1396321455, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/beed7310ba145af1a223c7c5f084efb8.jpg', 'username': None, 'uploaded_at': 1764198967, 'text': 'image_27112025_00_15_04_10145.jpg'}, {'photo_id': 1396321420, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/f7e2d9e530d67b29d0d1119ca8b6ba93.jpg', 'username': None, 'uploaded_at': 1764198967, 'text': 'image_27112025_00_15_15_10137.jpg'}, {'photo_id': 1396321389, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/412f2f27ad88b7de9f6da79e53482a45.jpg', 'username': None, 'uploaded_at': 1764198967, 'text': 'image_27112025_00_15_25_10139.jpg'}, {'photo_id': 1396321359, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/27/5752c524e60846accae80c71dda3aeb3.jpg', 'username': None, 'uploaded_at': 1764198967, 'text': 'image_27112025_00_15_35_10145.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ??????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002972126007080078 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 28942199, '2025-11-27' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-11-27' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2652013,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2422800064086914 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= 2652013 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2652013, 'dashboard_run_id': 2659063, 'mtr_portfolio_id': 28941827, 'dashboard_result_id': 17785806, '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_P28941827_27-11-2025_00_19_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28941834, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28941835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28941836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28941837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28941838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28941839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28941840, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28941841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28941842, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28941843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28941844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28941845, 'pht': 3726}}"}, {'dashboat_entry_day': 2652013, 'dashboard_run_id': 2659063, 'mtr_portfolio_id': 28942199, 'dashboard_result_id': 17785807, '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_P28942199_27-11-2025_00_30_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28942207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28942208, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28942209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28942210, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28942211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28942212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28942213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28942214, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28942215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28942216, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28942217, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28942218, 'pht': 3726}}"}, {'dashboat_entry_day': 2652013, 'dashboard_run_id': 2659063, 'mtr_portfolio_id': 28942703, 'dashboard_result_id': 17785808, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 28941827 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': 4125034, 'mtr_portfolio_id': 28941827, 'created_at': datetime.datetime(2025, 11, 27, 0, 19, 2), 'result': '0.05659695022701657', 'result_long': None, 'result_double': None}] Qualite : 0.05659695022701657 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28941827 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28941827_27-11-2025_00_19_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28941827 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_P28941827_27-11-2025_00_19_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28941834, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28941835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28941836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28941837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28941838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28941839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28941840, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28941841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28941842, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28941843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28941844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28941845, 'pht': 3726}}" where mtr_portfolio_id = 28941827 and dashboard_run_id = 2659063 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`=28941827 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17785806, 0.05659695022701657, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28941827_27-11-2025_00_19_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28941834, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28941835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28941836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28941837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28941838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28941839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28941840, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28941841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28941842, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28941843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28941844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28941845, '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 = 28942199 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': 4125088, 'mtr_portfolio_id': 28942199, 'created_at': datetime.datetime(2025, 11, 27, 0, 32, 59), 'result': '0.057228503797150936', 'result_long': None, 'result_double': None}] Qualite : 0.057228503797150936 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28942199 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28942199_27-11-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28942199 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_P28942199_27-11-2025_00_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28942207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28942208, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28942209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28942210, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28942211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28942212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28942213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28942214, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28942215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28942216, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28942217, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28942218, 'pht': 3726}}" where mtr_portfolio_id = 28942199 and dashboard_run_id = 2659063 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`=28942199 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17785807, 0.057228503797150936, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28942199_27-11-2025_00_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28942207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28942208, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28942209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28942210, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28942211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28942212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28942213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28942214, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28942215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28942216, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28942217, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28942218, '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 = 28942703 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 28942703 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28942703 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%28942703%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28942703 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': ''}" where mtr_portfolio_id = 28942703 and dashboard_run_id = 2659063 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28941827,28942199,28942703) result : ((1396317619,), (1396317651,), (1396317685,), (1396317965,), (1396317967,), (1396318445,), (1396318503,), (1396318567,), (1396318630,), (1396318695,), (1396319251,), (1396319304,), (1396319343,), (1396319376,), (1396319485,), (1396319515,), (1396319549,), (1396319809,), (1396319810,), (1396319812,), (1396319815,), (1396319819,), (1396319834,), (1396319835,), (1396319859,), (1396319862,), (1396319866,), (1396319876,), (1396319877,), (1396319879,), (1396320071,), (1396320102,), (1396320135,), (1396320165,), (1396320201,), (1396320376,), (1396320389,), (1396320408,), (1396320412,), (1396320416,), (1396320419,), (1396320428,), (1396320429,), (1396320431,), (1396320434,), (1396320448,), (1396320449,), (1396320451,), (1396320454,), (1396320465,), (1396320481,), (1396320482,), (1396320484,), (1396320487,), (1396320491,), (1396320656,), (1396320691,), (1396320731,), (1396320761,), (1396320796,), (1396321149,), (1396321184,), (1396321492,), (1396321325,), (1396321359,), (1396321389,), (1396321420,), (1396321455,), (1396321621,), (1396321622,), (1396321623,), (1396321625,), (1396321627,), (1396321660,), (1396321666,), (1396321668,), (1396321671,), (1396321702,), (1396321703,), (1396321704,), (1396321706,), (1396321710,), (1396321713,), (1396321725,), (1396321726,), (1396321728,), (1396321736,), (1396321744,), (1396322317,), (1396322319,), (1396322322,), (1396322354,), (1396322466,), (1396322467,), (1396322469,), (1396322471,), (1396322474,), (1396322477,), (1396322485,), (1396322487,), (1396322490,), (1396322493,), (1396322517,), (1396322545,), (1396322546,), (1396322565,), (1396322574,), (1396322580,), (1396322582,), (1396322584,), (1396322727,), (1396322759,), (1396322788,), (1396322822,), (1396322851,), (1396323010,), (1396323017,), (1396323018,), (1396323019,), (1396323058,), (1396323061,), (1396323084,), (1396323086,), (1396323088,), (1396323111,), (1396323570,), (1396323665,), (1396323667,), (1396323698,), (1396323709,), (1396323541,), (1396323549,), (1396323551,), (1396323552,), (1396323555,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'27112025': {'nb_upload': 67, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28942199]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] map_info['map_portfolio_photo'] : {28942199: [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084, 1396323061, 1396323058, 1396323019, 1396323018, 1396323017, 1396323010, 1396322851, 1396322822, 1396322788, 1396322759, 1396322727, 1396322584, 1396322582, 1396322580, 1396322574, 1396322565, 1396322546, 1396322545, 1396322517, 1396322493, 1396322490, 1396322487, 1396322485, 1396322477, 1396322474, 1396322471, 1396322469, 1396322467, 1396322466, 1396322354, 1396322322, 1396322319, 1396322317, 1396321744, 1396321736, 1396321728, 1396321726, 1396321725, 1396321713, 1396321710, 1396321706, 1396321704, 1396321703, 1396321702, 1396321671, 1396321668, 1396321666, 1396321660, 1396321627, 1396321625, 1396321623, 1396321622, 1396321621, 1396321455, 1396321420, 1396321389, 1396321359, 1396321325]} final : True mtd_id 4302 list_pids : [1396323709, 1396323698, 1396323667, 1396323665, 1396323570, 1396323111, 1396323088, 1396323086, 1396323084] Looping around the photos to save general results len do output : 1 /28942199Didn'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, '4125088') ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088') ('4302', None, None, None, None, None, None, None, '4125088') ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088') 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, '28942199', 'None', None, None, None, None, '4125088'), ('4302', '28942199', '1396323709', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323698', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323667', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323665', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323570', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323111', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323088', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323086', None, None, None, None, None, '4125088'), ('4302', '28942199', '1396323084', None, None, None, None, None, '4125088')] time used for this insertion : 0.016026973724365234 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.706435203552246 time spend to save output : 0.01627945899963379 total time spend for step 5 : 1.7227146625518799 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 (4125088) 2.04user 2.49system 0:12.81elapsed 35%CPU (0avgtext+0avgdata 160212maxresident)k 4736inputs+14224outputs (87major+64328minor)pagefaults 0swaps