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 : 952079 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 (3743903) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3743903) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018974 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3743903'] with mtr_portfolio_ids : ['27018974'] and first list_photo_ids : [] new path : /proc/952079/ Name: python3 Umask: 0002 State: R (running) Tgid: 952079 Ngid: 0 Pid: 952079 PPid: 952078 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 952079 NSpid: 952079 NSpgid: 939738 NSsid: 939738 VmPeak: 1107344 kB VmSize: 1107344 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99324 kB VmRSS: 99324 kB RssAnon: 60168 kB RssFile: 39156 kB RssShmem: 0 kB VmData: 866096 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 49 nonvoluntary_ctxt_switches: 109 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '952079', 'Ngid': '0', 'Pid': '952079', 'PPid': '952078', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '952079', 'NSpid': '952079', 'NSpgid': '939738', 'NSsid': '939738', 'VmPeak': '1107344 kB', 'VmSize': '1107344 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99324 kB', 'VmRSS': '99324 kB', 'RssAnon': '60168 kB', 'RssFile': '39156 kB', 'RssShmem': '0 kB', 'VmData': '866096 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '49', 'nonvoluntary_ctxt_switches': '109'} ('datou_batch_current', '952079', '1107344', '0', '1107344', '866096', '99324', b'', 'marlene', '3743903') 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 ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27018974) 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 (3743903 ) ) 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 (27018974) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1384971147, 'portfolio_id': 27018974}, {'photo_id': 1384971144, 'portfolio_id': 27018974}, {'photo_id': 1384971141, 'portfolio_id': 27018974}, {'photo_id': 1384971136, 'portfolio_id': 27018974}, {'photo_id': 1384971133, 'portfolio_id': 27018974}, {'photo_id': 1384971130, 'portfolio_id': 27018974}, {'photo_id': 1384971125, 'portfolio_id': 27018974}, {'photo_id': 1384971123, 'portfolio_id': 27018974}, {'photo_id': 1384971120, 'portfolio_id': 27018974}, {'photo_id': 1384971118, 'portfolio_id': 27018974}, {'photo_id': 1384971117, 'portfolio_id': 27018974}, {'photo_id': 1384971116, 'portfolio_id': 27018974}, {'photo_id': 1384971075, 'portfolio_id': 27018974}, {'photo_id': 1384971073, 'portfolio_id': 27018974}, {'photo_id': 1384971072, 'portfolio_id': 27018974}, {'photo_id': 1384971070, 'portfolio_id': 27018974}, {'photo_id': 1384971069, 'portfolio_id': 27018974}, {'photo_id': 1384971068, 'portfolio_id': 27018974}, {'photo_id': 1384971059, 'portfolio_id': 27018974}, {'photo_id': 1384971056, 'portfolio_id': 27018974}, {'photo_id': 1384971054, 'portfolio_id': 27018974}, {'photo_id': 1384971038, 'portfolio_id': 27018974}, {'photo_id': 1384971036, 'portfolio_id': 27018974}, {'photo_id': 1384971032, 'portfolio_id': 27018974}, {'photo_id': 1384971030, 'portfolio_id': 27018974}, {'photo_id': 1384971027, 'portfolio_id': 27018974}, {'photo_id': 1384970980, 'portfolio_id': 27018974}, {'photo_id': 1384970977, 'portfolio_id': 27018974}, {'photo_id': 1384970970, 'portfolio_id': 27018974}, {'photo_id': 1384970963, 'portfolio_id': 27018974}, {'photo_id': 1384970960, 'portfolio_id': 27018974}, {'photo_id': 1384970945, 'portfolio_id': 27018974}, {'photo_id': 1384970944, 'portfolio_id': 27018974}, {'photo_id': 1384970942, 'portfolio_id': 27018974}, {'photo_id': 1384970881, 'portfolio_id': 27018974}, {'photo_id': 1384970878, 'portfolio_id': 27018974}, {'photo_id': 1384970836, 'portfolio_id': 27018974}, {'photo_id': 1384970833, 'portfolio_id': 27018974}, {'photo_id': 1384970831, 'portfolio_id': 27018974}, {'photo_id': 1384970829, 'portfolio_id': 27018974}, {'photo_id': 1384970827, 'portfolio_id': 27018974}, {'photo_id': 1384970825, 'portfolio_id': 27018974}, {'photo_id': 1384970819, 'portfolio_id': 27018974}, {'photo_id': 1384970817, 'portfolio_id': 27018974}, {'photo_id': 1384970814, 'portfolio_id': 27018974}, {'photo_id': 1384970812, 'portfolio_id': 27018974}, {'photo_id': 1384970801, 'portfolio_id': 27018974}, {'photo_id': 1384970784, 'portfolio_id': 27018974}, {'photo_id': 1384970783, 'portfolio_id': 27018974}, {'photo_id': 1384970779, 'portfolio_id': 27018974}, {'photo_id': 1384970775, 'portfolio_id': 27018974}, {'photo_id': 1384970745, 'portfolio_id': 27018974}, {'photo_id': 1384970743, 'portfolio_id': 27018974}, {'photo_id': 1384970739, 'portfolio_id': 27018974}, {'photo_id': 1384970737, 'portfolio_id': 27018974}, {'photo_id': 1384970735, 'portfolio_id': 27018974}, {'photo_id': 1384970713, 'portfolio_id': 27018974}, {'photo_id': 1384970711, 'portfolio_id': 27018974}, {'photo_id': 1384970707, 'portfolio_id': 27018974}, {'photo_id': 1384970706, 'portfolio_id': 27018974}, {'photo_id': 1384970705, 'portfolio_id': 27018974}, {'photo_id': 1384970692, 'portfolio_id': 27018974}, {'photo_id': 1384970690, 'portfolio_id': 27018974}, {'photo_id': 1384970688, 'portfolio_id': 27018974}] map_portfolio_id_photo_id: {27018974: [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116, 1384971075, 1384971073, 1384971072, 1384971070, 1384971069, 1384971068, 1384971059, 1384971056, 1384971054, 1384971038, 1384971036, 1384971032, 1384971030, 1384971027, 1384970980, 1384970977, 1384970970, 1384970963, 1384970960, 1384970945, 1384970944, 1384970942, 1384970881, 1384970878, 1384970836, 1384970833, 1384970831, 1384970829, 1384970827, 1384970825, 1384970819, 1384970817, 1384970814, 1384970812, 1384970801, 1384970784, 1384970783, 1384970779, 1384970775, 1384970745, 1384970743, 1384970739, 1384970737, 1384970735, 1384970713, 1384970711, 1384970707, 1384970706, 1384970705, 1384970692, 1384970690, 1384970688]} ##### 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.015076637268066406 #### 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 Fri Sep 19 02:00: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 (27018974) 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 : 27018974 get user id for portfolio 27018974 get sub ptf for main ptf 27018974, type 3726 and hashtags ['papier', 'Carton_brun', 'environnement', 'cartonnette', 'flou', 'Teint_Dans_La_Masse', 'plastique', 'metal', 'kraft', 'Carton_gris', 'autre_refus', 'mal_croppe'] 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`=27018974 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','environnement','cartonnette','flou','Teint_Dans_La_Masse','plastique','metal','kraft','Carton_gris','autre_refus','mal_croppe')) 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`=27018974 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','environnement','cartonnette','flou','Teint_Dans_La_Masse','plastique','metal','kraft','Carton_gris','autre_refus','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 27018974, 'sub_port_id': 27018980, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231552, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'autre_refus': {'main_port_id': 27018974, 'sub_port_id': 27018981, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231553, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'environnement': {'main_port_id': 27018974, 'sub_port_id': 27018982, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231554, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'Carton_gris': {'main_port_id': 27018974, 'sub_port_id': 27018983, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231555, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'metal': {'main_port_id': 27018974, 'sub_port_id': 27018984, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231556, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'papier': {'main_port_id': 27018974, 'sub_port_id': 27018985, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231557, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'mal_croppe': {'main_port_id': 27018974, 'sub_port_id': 27018986, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231558, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'flou': {'main_port_id': 27018974, 'sub_port_id': 27018987, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231559, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'plastique': {'main_port_id': 27018974, 'sub_port_id': 27018988, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231560, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'kraft': {'main_port_id': 27018974, 'sub_port_id': 27018989, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231561, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'cartonnette': {'main_port_id': 27018974, 'sub_port_id': 27018990, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231562, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}, 'Carton_brun': {'main_port_id': 27018974, 'sub_port_id': 27018991, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231563, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27018980 , 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=27018974 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 (27018980) result : ((1384970802,), (1384970803,), (1384970861,), (1384970962,), (1384971043,), (1384971044,), (1384971077,), (1384971086,), (1384971152,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018981 , 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=27018974 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 (27018981) result : ((1384970953,), (1384971045,), (1384971046,), (1384971153,), (1384971154,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018982 , 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=27018974 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 (27018982) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018983 , 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=27018974 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 (27018983) result : ((1384970727,), (1384970805,), (1384970954,), (1384970955,), (1384971047,), (1384971078,), (1384971079,), (1384971088,), (1384971156,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018984 , 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=27018974 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 (27018984) result : ((1384971157,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018985 , 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=27018974 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 (27018985) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018986 , 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=27018974 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 (27018986) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018987 , 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=27018974 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 (27018987) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018988 , 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=27018974 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 (27018988) result : ((1384970810,), (1384970976,), (1384971160,), (1384971161,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018989 , 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=27018974 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 (27018989) result : ((1384971052,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018990 , 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=27018974 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 (27018990) result : ((1384970729,), (1384970806,), (1384970807,), (1384970957,), (1384970964,), (1384970965,), (1384970966,), (1384970968,), (1384970969,), (1384971048,), (1384971049,), (1384971050,), (1384971080,), (1384971094,), (1384971155,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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 27018991 , 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=27018974 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 (27018991) result : ((1384970731,), (1384970808,), (1384970809,), (1384970868,), (1384970958,), (1384970971,), (1384970972,), (1384970973,), (1384970974,), (1384971051,), (1384971159,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27018974) result : ((1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) 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`=27018974 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','environnement','cartonnette','flou','Teint_Dans_La_Masse','plastique','metal','kraft','Carton_gris','autre_refus','mal_croppe')) 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`=27018974 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','environnement','cartonnette','flou','Teint_Dans_La_Masse','plastique','metal','kraft','Carton_gris','autre_refus','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 27018974, 'sub_port_id': 27018992, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231564, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'autre_refus': {'main_port_id': 27018974, 'sub_port_id': 27018993, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231565, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'environnement': {'main_port_id': 27018974, 'sub_port_id': 27018994, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231566, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'Carton_gris': {'main_port_id': 27018974, 'sub_port_id': 27018995, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231567, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'metal': {'main_port_id': 27018974, 'sub_port_id': 27018996, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231568, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'papier': {'main_port_id': 27018974, 'sub_port_id': 27018997, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231569, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'mal_croppe': {'main_port_id': 27018974, 'sub_port_id': 27018998, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231570, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'flou': {'main_port_id': 27018974, 'sub_port_id': 27018999, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231571, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'plastique': {'main_port_id': 27018974, 'sub_port_id': 27019000, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231572, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'kraft': {'main_port_id': 27018974, 'sub_port_id': 27019001, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231573, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'cartonnette': {'main_port_id': 27018974, 'sub_port_id': 27019002, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231574, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 47, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}, 'Carton_brun': {'main_port_id': 27018974, 'sub_port_id': 27019003, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18231575, 'last_updated_at': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 1, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 1, 47, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018992,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018980 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018993,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018981 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018994,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018982 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018995,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018983 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018984 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018985 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018986 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27018999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018987 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27019000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018988 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27019001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018989 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27019002,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018990 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27019003,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27018991 lien utilise dans velours : https://marlene.fotonower.com/velours/27018992,27018993,27018994,27018995,27018996,27018997,27018998,27018999,27019000,27019001,27019002,27019003?tags=Teint_Dans_La_Masse,autre_refus,environnement,Carton_gris,metal,papier,mal_croppe,flou,plastique,kraft,cartonnette,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27018974]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] map_info['map_portfolio_photo'] : {27018974: [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116, 1384971075, 1384971073, 1384971072, 1384971070, 1384971069, 1384971068, 1384971059, 1384971056, 1384971054, 1384971038, 1384971036, 1384971032, 1384971030, 1384971027, 1384970980, 1384970977, 1384970970, 1384970963, 1384970960, 1384970945, 1384970944, 1384970942, 1384970881, 1384970878, 1384970836, 1384970833, 1384970831, 1384970829, 1384970827, 1384970825, 1384970819, 1384970817, 1384970814, 1384970812, 1384970801, 1384970784, 1384970783, 1384970779, 1384970775, 1384970745, 1384970743, 1384970739, 1384970737, 1384970735, 1384970713, 1384970711, 1384970707, 1384970706, 1384970705, 1384970692, 1384970690, 1384970688]} final : False mtd_id 4302 list_pids : [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] Looping around the photos to save general results len do output : 1 /27018974. 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, '3743903') ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '27018974', "{'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991}", None, None, None, None, '3743903'), ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903')] time used for this insertion : 0.15164828300476074 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6416869163513184 time spend to save output : 0.1520240306854248 total time spend for step 1 : 1.7937109470367432 step2:final Fri Sep 19 02:00:58 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 (27018974) 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 27018974 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1384970692,1384970690,1384970688,1384970713,1384970711,1384970707,1384970706,1384970705,1384970745,1384970743,1384970739,1384970737,1384970735,1384970784,1384970783,1384970779,1384970775,1384970819,1384970817,1384970814,1384970801,1384970812,1384970836,1384970833,1384970831,1384970829,1384970827,1384970825,1384970881,1384970878,1384970945,1384970944,1384970942,1384970980,1384970977,1384970970,1384970963,1384970960,1384971038,1384971036,1384971032,1384971030,1384971027,1384971059,1384971056,1384971054,1384971075,1384971073,1384971072,1384971070,1384971069,1384971068,1384971125,1384971123,1384971120,1384971118,1384971117,1384971116,1384971147,1384971144,1384971141,1384971136,1384971133,1384971130); 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([27018974]) Inside saveOutput : final : False verbose : True original output for save of step final : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} new output for save of step final : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] map_info['map_portfolio_photo'] : {27018974: [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116, 1384971075, 1384971073, 1384971072, 1384971070, 1384971069, 1384971068, 1384971059, 1384971056, 1384971054, 1384971038, 1384971036, 1384971032, 1384971030, 1384971027, 1384970980, 1384970977, 1384970970, 1384970963, 1384970960, 1384970945, 1384970944, 1384970942, 1384970881, 1384970878, 1384970836, 1384970833, 1384970831, 1384970829, 1384970827, 1384970825, 1384970819, 1384970817, 1384970814, 1384970812, 1384970801, 1384970784, 1384970783, 1384970779, 1384970775, 1384970745, 1384970743, 1384970739, 1384970737, 1384970735, 1384970713, 1384970711, 1384970707, 1384970706, 1384970705, 1384970692, 1384970690, 1384970688]} final : False mtd_id 4302 list_pids : [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] Looping around the photos to save general results len do output : 12 /1384971147.Didn't retrieve data . /1384971144.Didn't retrieve data . /1384971141.Didn't retrieve data . /1384971136.Didn't retrieve data . /1384971133.Didn't retrieve data . /1384971130.Didn't retrieve data . /1384971125.Didn't retrieve data . /1384971123.Didn't retrieve data . /1384971120.Didn't retrieve data . /1384971118.Didn't retrieve data . /1384971117.Didn't retrieve data . /1384971116.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, '3743903') ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '27018974', '1384971147', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971144', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971141', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971136', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971133', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971130', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971125', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971123', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971120', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971118', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971117', '0.064230441106751', None, None, None, None, '3743903'), ('4302', '27018974', '1384971116', '0.064230441106751', None, None, None, None, '3743903')] time used for this insertion : 0.08196139335632324 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.26131200790405273 time spend to save output : 0.08261561393737793 total time spend for step 2 : 0.34392762184143066 step3:velours_tree Fri Sep 19 02:00: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 : {27018974: [{'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991}]} input_args_next_step : {27018974: ()} output_args : {27018974: [{'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991}]} args : 27018974 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 : ({'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27018974) 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([27018974]) 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.33254337310791016 time spend to save output : 5.316734313964844e-05 total time spend for step 3 : 0.3325965404510498 step4:send_mail_cod Fri Sep 19 02:00: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 : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} input_args_next_step : {1384971147: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971147 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971144 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971141 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971136 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971133 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971130 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971125 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971123 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971120 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971118 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971117 depend.output_id : 0 input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ()} output_args : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',)} args : 1384971116 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 : {27018974: [{'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991}]} input_args_next_step : {1384971147: ('0.064230441106751',), 1384971144: ('0.064230441106751',), 1384971141: ('0.064230441106751',), 1384971136: ('0.064230441106751',), 1384971133: ('0.064230441106751',), 1384971130: ('0.064230441106751',), 1384971125: ('0.064230441106751',), 1384971123: ('0.064230441106751',), 1384971120: ('0.064230441106751',), 1384971118: ('0.064230441106751',), 1384971117: ('0.064230441106751',), 1384971116: ('0.064230441106751',), 27018974: ()} output_args : {27018974: [{'Teint_Dans_La_Masse': 27018980, 'autre_refus': 27018981, 'environnement': 27018982, 'Carton_gris': 27018983, 'metal': 27018984, 'papier': 27018985, 'mal_croppe': 27018986, 'flou': 27018987, 'plastique': 27018988, 'kraft': 27018989, 'cartonnette': 27018990, 'Carton_brun': 27018991}]} args : 27018974 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 :13, first value : ('0.064230441106751',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27018974) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1384971147,1384971144,1384971141,1384971136,1384971133,1384971130,1384971125,1384971123,1384971120,1384971118,1384971117,1384971116) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1384971116 begin to download photo : 1384971120 begin to download photo : 1384971130 begin to download photo : 1384971141 download finish for photo 1384971116 begin to download photo : 1384971117 download finish for photo 1384971141 begin to download photo : 1384971144 download finish for photo 1384971120 begin to download photo : 1384971123 download finish for photo 1384971130 begin to download photo : 1384971133 download finish for photo 1384971117 begin to download photo : 1384971118 download finish for photo 1384971144 begin to download photo : 1384971147 download finish for photo 1384971123 begin to download photo : 1384971125 download finish for photo 1384971133 begin to download photo : 1384971136 download finish for photo 1384971118 download finish for photo 1384971125 download finish for photo 1384971147 download finish for photo 1384971136 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 : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P27018974_19-09-2025_02_01_00.pdf 27018981 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018981 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970953: '1758239586_1640770_1384970735_c31c8ad12b56dc6b4dd73503da913328_rle_crop_3967053358_0.png', 1384971045: '1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053708_0.png', 1384971046: '1758239705_1646189_1384970825_6be5315216e54daa23165097f12f5f37_rle_crop_3967053753_0.png', 1384971153: '1758239966_1655381_1384971069_27afb013a328e4de8fb06af74af4846a_rle_crop_3967068074_0.png', 1384971154: '1758239966_1655381_1384971069_27afb013a328e4de8fb06af74af4846a_rle_crop_3967068077_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/9e17080b72db7155dc657da3570cb892_60319339.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/cb518ceb21dd029466e92af31b4bff00_24849893.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/d4b9faa32f156db8925612d18c1c63d8_1264197.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/e89674f0f19e0c3f71bc20c71da0fbed_73671697.png change filename to text .imagette270189811758240060/ imagette270189811758240060/1758239705_1646189_1384970825_6be5315216e54daa23165097f12f5f37_rle_crop_3967053753_0.png.png imagette270189811758240060/1758239966_1655381_1384971069_27afb013a328e4de8fb06af74af4846a_rle_crop_3967068077_0.png.png imagette270189811758240060/1758239966_1655381_1384971069_27afb013a328e4de8fb06af74af4846a_rle_crop_3967068074_0.png.png imagette270189811758240060/1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053708_0.png.png imagette270189811758240060/1758239586_1640770_1384970735_c31c8ad12b56dc6b4dd73503da913328_rle_crop_3967053358_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/546e51eb9372c8ffa60e27c57df7adbe_86907328.png imagette270189811758240060 27018984 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018984 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384971157: '1758239946_1655045_1384971059_a010beab5e494429cc4abeaa5788df65_rle_crop_3967067199_0.png'} change filename to text .imagette270189841758240060/ imagette270189841758240060/1758239946_1655045_1384971059_a010beab5e494429cc4abeaa5788df65_rle_crop_3967067199_0.png.png imagette270189861758240060/ imagette270189871758240060/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/05c0fe060a1954edf7460b92fcba921b_44781819.png imagette270189841758240060 27018986 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018986 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270189861758240060 27018987 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018987 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270189871758240060 27018988 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018988 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970810: '1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052624_0.png', 1384970976: '1758239607_1641108_1384970836_8e2d741ba6716898240c162e2ddb440b_rle_crop_3967053477_0.png', 1384971160: '1758239966_1655381_1384971073_f1880388b5e2321576637effc70ab8e2_rle_crop_3967067189_0.png', 1384971161: '1758239966_1655381_1384971068_dd03e5d8d79842b16e0de9914d2d6b8d_rle_crop_3967068110_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/614735a867d05d144a2d952ccda3b5b5_44630929.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/b22961bd85a93e42c3b380a603745f55_3416218.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/889e0b23017173090623814a6d61d2c8_89305392.png change filename to text .imagette270189881758240060/ imagette270189881758240060/1758239607_1641108_1384970836_8e2d741ba6716898240c162e2ddb440b_rle_crop_3967053477_0.png.png imagette270189881758240060/1758239966_1655381_1384971073_f1880388b5e2321576637effc70ab8e2_rle_crop_3967067189_0.png.png imagette270189881758240060/1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052624_0.png.png imagette270189881758240060/1758239966_1655381_1384971068_dd03e5d8d79842b16e0de9914d2d6b8d_rle_crop_3967068110_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/62675eb71a3706ac76bb1289e6a42558_86944883.png imagette270189881758240060 27018989 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018989 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384971052: '1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053699_0.png'} change filename to text .imagette270189891758240061/ imagette270189891758240061/1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053699_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/790c7692dbbca05e52c05cc8c97fe006_2640054.png imagette270189891758240061 27018990 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018990 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970729: '1758239248_1623537_1384970688_7919e53282d71dd87832b616cb6f1fcc_rle_crop_3967052214_0.png', 1384970806: '1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052631_0.png', 1384970807: '1758239367_1628984_1384970706_6d748120c7f57e3ba823b578a9f79327_rle_crop_3967052661_0.png', 1384970957: '1758239586_1640770_1384970784_af685ce7f1e24c38d71f5a2f57f58885_rle_crop_3967053316_0.png', 1384970964: '1758239607_1641108_1384970836_8e2d741ba6716898240c162e2ddb440b_rle_crop_3967053475_0.png', 1384970965: '1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053486_0.png', 1384970966: '1758239607_1641108_1384970812_b7a457ca689717744ce66b6aa5f61eb8_rle_crop_3967053498_0.png', 1384970968: '1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053510_0.png', 1384970969: '1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053514_0.png', 1384971048: '1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053697_0.png', 1384971049: '1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053713_0.png', 1384971050: '1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053709_0.png', 1384971080: '1758239826_1649368_1384970942_054ffa7d42d6ab03c5ff93d35cd49c23_rle_crop_3967057181_0.png', 1384971094: '1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058706_0.png', 1384971155: '1758239946_1655045_1384971036_221f4f6263eb406e31290b3d2f002381_rle_crop_3967068040_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/966919e79ca6ec128f518790dc86fb50_73823022.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/da1a9a2484e6d7143d0fe19b21c41d15_78686190.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/5b9cac78ff043091f2da5dda90fa151b_66673086.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/fc905b18cf974b9144b6ec036f1d50f0_62957112.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/ed017c30d8535fed9df4c10df6892c75_37582447.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/895949281c2369ee520fa6adb3b0887e_59903030.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/179399118cbd13831f176283d36f437e_92359324.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/307069458bf68c98ee863c45d10e2021_64580618.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/f62e0d9d7713ff112248f93e8154478d_29483375.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/b502408439071e64b298e3d937ea38bc_51191869.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/29c3193687d999d02d36877db227ed1b_37278646.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/364e8c28690663b0015166fa98276725_3255004.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/4d6b2f951f7fb3247b8f6d6ded2159fc_15531026.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/7196a28f5a27d8449714d00e7b5502d5_11601332.png change filename to text .imagette270189901758240061/ imagette270189901758240061/1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053709_0.png.png imagette270189901758240061/1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052631_0.png.png imagette270189901758240061/1758239248_1623537_1384970688_7919e53282d71dd87832b616cb6f1fcc_rle_crop_3967052214_0.png.png imagette270189901758240061/1758239586_1640770_1384970784_af685ce7f1e24c38d71f5a2f57f58885_rle_crop_3967053316_0.png.png imagette270189901758240061/1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053514_0.png.png imagette270189901758240061/1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053486_0.png.png imagette270189901758240061/1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053510_0.png.png imagette270189901758240061/1758239826_1649368_1384970942_054ffa7d42d6ab03c5ff93d35cd49c23_rle_crop_3967057181_0.png.png imagette270189901758240061/1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058706_0.png.png imagette270189901758240061/1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053713_0.png.png imagette270189901758240061/1758239607_1641108_1384970812_b7a457ca689717744ce66b6aa5f61eb8_rle_crop_3967053498_0.png.png imagette270189901758240061/1758239946_1655045_1384971036_221f4f6263eb406e31290b3d2f002381_rle_crop_3967068040_0.png.png imagette270189901758240061/1758239367_1628984_1384970706_6d748120c7f57e3ba823b578a9f79327_rle_crop_3967052661_0.png.png imagette270189901758240061/1758239607_1641108_1384970836_8e2d741ba6716898240c162e2ddb440b_rle_crop_3967053475_0.png.png imagette270189901758240061/1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053697_0.png.png wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/8ec4106ab17ff53509dcfd1151bfa854_91377403.png imagette270189901758240061 27018980 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018980 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970802: '1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052628_0.png', 1384970803: '1758239367_1628984_1384970707_48401d2f131e2442dba4403d54a799ea_rle_crop_3967052646_0.png', 1384970861: '1758239486_1635668_1384970775_045216b6222a897bdd8cabb433240470_rle_crop_3967053102_0.png', 1384970962: '1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053516_0.png', 1384971043: '1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053711_0.png', 1384971044: '1758239705_1646189_1384970831_bccc1d4442c2715f6fa40bd4c2e7aaaa_rle_crop_3967053726_0.png', 1384971077: '1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057163_0.png', 1384971086: '1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058710_0.png', 1384971152: '1758239946_1655045_1384971027_eb50f178a9f8e181013f3ac42d8380e1_rle_crop_3967068098_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/d54a451752286541dc5340f60161d9a7_41321668.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/f7d2b525d259ae0bd3ea126cb07595f2_50112619.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/37893e80975e78aa77fd1de4314be263_29179794.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/3bf4ac73d1b21e257bbf7e7c4e9ed328_27785564.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/3ba0dd8361041a39f89500bb6ff7a4f1_93764794.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/28d740a907cee94d32262f10ac2b3400_34317790.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/a7eda35c8ac267592c68e37a2821670d_36406045.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/a9072e52e8abb8e281936b750ca98be3_5910500.png change filename to text .imagette270189801758240062/ imagette270189801758240062/1758239486_1635668_1384970775_045216b6222a897bdd8cabb433240470_rle_crop_3967053102_0.png.png imagette270189801758240062/1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057163_0.png.png imagette270189801758240062/1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053516_0.png.png imagette270189801758240062/1758239946_1655045_1384971027_eb50f178a9f8e181013f3ac42d8380e1_rle_crop_3967068098_0.png.png imagette270189801758240062/1758239367_1628984_1384970707_48401d2f131e2442dba4403d54a799ea_rle_crop_3967052646_0.png.png imagette270189801758240062/1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058710_0.png.png imagette270189801758240062/1758239705_1646189_1384970831_bccc1d4442c2715f6fa40bd4c2e7aaaa_rle_crop_3967053726_0.png.png imagette270189801758240062/1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052628_0.png.png imagette270189801758240062/1758239705_1646189_1384970833_6d602ce9cef66bbdbc4b7a7c55b676e3_rle_crop_3967053711_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/bbcea78b6f0ed56ce8031e8aed081d97_54006528.png imagette270189801758240062 27018983 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018983 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970727: '1758239248_1623537_1384970688_7919e53282d71dd87832b616cb6f1fcc_rle_crop_3967052213_0.png', 1384970805: '1758239367_1628984_1384970707_48401d2f131e2442dba4403d54a799ea_rle_crop_3967052642_0.png', 1384970954: '1758239586_1640770_1384970743_231cd2adb5054492ee7411f985ad52a0_rle_crop_3967053329_0.png', 1384970955: '1758239586_1640770_1384970739_1ecbd3e69bffd4eeeb6a390e61267e6a_rle_crop_3967053341_0.png', 1384971047: '1758239705_1646189_1384970825_6be5315216e54daa23165097f12f5f37_rle_crop_3967053761_0.png', 1384971078: '1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057167_0.png', 1384971079: '1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057164_0.png', 1384971088: '1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058709_0.png', 1384971156: '1758239966_1655381_1384971068_dd03e5d8d79842b16e0de9914d2d6b8d_rle_crop_3967068106_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/7595bd4526e8a2018e07ae37587072da_51292368.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/285b33192271e59f757b7c95de787099_77873998.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/0c34642af9c2cc1f26b90722ff4edc36_945560.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/fa6357cb495ce7def64392e79e1fa526_44436354.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/8f0c98ad7e6e9c14b47c4ef317ac6231_92729553.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/4809a7363996c77aba94abc7196b983e_3254140.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/47d5a3466ffd2a26cffb166ac0878fe5_36210576.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/78d25aa757bd6eb4fae08fa4331e0552_94444330.png change filename to text .imagette270189831758240062/ imagette270189831758240062/1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057164_0.png.png imagette270189831758240062/1758239248_1623537_1384970688_7919e53282d71dd87832b616cb6f1fcc_rle_crop_3967052213_0.png.png imagette270189831758240062/1758239846_1649736_1384971054_03cff151911819fd4b5ba0f14ba35f0b_rle_crop_3967058709_0.png.png imagette270189831758240062/1758239826_1649368_1384970944_8d46c327cd57b15ea94abb9ee3f2f190_rle_crop_3967057167_0.png.png imagette270189831758240062/1758239586_1640770_1384970739_1ecbd3e69bffd4eeeb6a390e61267e6a_rle_crop_3967053341_0.png.png imagette270189831758240062/1758239367_1628984_1384970707_48401d2f131e2442dba4403d54a799ea_rle_crop_3967052642_0.png.png imagette270189831758240062/1758239966_1655381_1384971068_dd03e5d8d79842b16e0de9914d2d6b8d_rle_crop_3967068106_0.png.png imagette270189831758240062/1758239705_1646189_1384970825_6be5315216e54daa23165097f12f5f37_rle_crop_3967053761_0.png.png imagette270189831758240062/1758239586_1640770_1384970743_231cd2adb5054492ee7411f985ad52a0_rle_crop_3967053329_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/54aaa98a975580de5ecbe90d26328cb0_3189099.png imagette270189831758240062 27018991 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018991 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384970731: '1758239248_1623537_1384970690_103162d2a8523a71fb7fb3de94249fa7_rle_crop_3967052205_0.png', 1384970808: '1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052633_0.png', 1384970809: '1758239367_1628984_1384970705_367d0a0aeaca61e5b532374a5082c6e4_rle_crop_3967052674_0.png', 1384970868: '1758239486_1635668_1384970775_045216b6222a897bdd8cabb433240470_rle_crop_3967053106_0.png', 1384970958: '1758239586_1640770_1384970735_c31c8ad12b56dc6b4dd73503da913328_rle_crop_3967053367_0.png', 1384970971: '1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053491_0.png', 1384970972: '1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053487_0.png', 1384970973: '1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053513_0.png', 1384970974: '1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053511_0.png', 1384971051: '1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053700_0.png', 1384971159: '1758239966_1655381_1384971073_f1880388b5e2321576637effc70ab8e2_rle_crop_3967067191_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/d8a6c9dad545f9de772e837db417237d_25350973.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/06bc24c01544644383d13dc0b8d0aad0_80257856.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/308c9cef12255ff0951f5988b9d7e2ae_80556198.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/1ff9d1a412fa739cb2fb5796ff19d748_34866937.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/2e312d01b2f11071cedd4e1a2bcb407f_52524555.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/400978fde77b69958c4c55440f566a72_48663238.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/7934ee4d00f354b8405c87b331247de2_44207445.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/9600d78ee65c342cf272f7d755d5e307_33362985.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/37ddc3dafb45e3346738386263275197_82984390.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/95f47ed6d41f73ab1b7e4c9bf22cd4b9_77895149.png change filename to text .imagette270189911758240063/ imagette270189911758240063/1758239367_1628984_1384970705_367d0a0aeaca61e5b532374a5082c6e4_rle_crop_3967052674_0.png.png imagette270189911758240063/1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053513_0.png.png imagette270189911758240063/1758239248_1623537_1384970690_103162d2a8523a71fb7fb3de94249fa7_rle_crop_3967052205_0.png.png imagette270189911758240063/1758239486_1635668_1384970775_045216b6222a897bdd8cabb433240470_rle_crop_3967053106_0.png.png imagette270189911758240063/1758239705_1646189_1384970881_881129fbdc8889580ac4910d8ec089b5_rle_crop_3967053700_0.png.png imagette270189911758240063/1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053491_0.png.png imagette270189911758240063/1758239367_1628984_1384970711_dc69623d8fe7865469fa1de8a307bcf2_rle_crop_3967052633_0.png.png imagette270189911758240063/1758239607_1641108_1384970814_7805b3fe328f742edd0a739b3624b53e_rle_crop_3967053487_0.png.png imagette270189911758240063/1758239586_1640770_1384970735_c31c8ad12b56dc6b4dd73503da913328_rle_crop_3967053367_0.png.png imagette270189911758240063/1758239607_1641108_1384970801_df1fdeceabc9c1066c571f97fd109c24_rle_crop_3967053511_0.png.png imagette270189911758240063/1758239966_1655381_1384971073_f1880388b5e2321576637effc70ab8e2_rle_crop_3967067191_0.png.png wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/79680179a461465d2f39412d5894d92e_80927371.png imagette270189911758240063 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27018974 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27018992,27018993,27018994,27018995,27018996,27018997,27018998,27018999,27019000,27019001,27019002,27019003?tags=Teint_Dans_La_Masse,autre_refus,environnement,Carton_gris,metal,papier,mal_croppe,flou,plastique,kraft,cartonnette,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1384971147] : ('0.064230441106751',) no score found for photo 1384971147 We are sending mail with results at report@fotonower.com args[1384971144] : ('0.064230441106751',) no score found for photo 1384971144 We are sending mail with results at report@fotonower.com args[1384971141] : ('0.064230441106751',) no score found for photo 1384971141 We are sending mail with results at report@fotonower.com args[1384971136] : ('0.064230441106751',) no score found for photo 1384971136 We are sending mail with results at report@fotonower.com args[1384971133] : ('0.064230441106751',) no score found for photo 1384971133 We are sending mail with results at report@fotonower.com args[1384971130] : ('0.064230441106751',) no score found for photo 1384971130 We are sending mail with results at report@fotonower.com args[1384971125] : ('0.064230441106751',) no score found for photo 1384971125 We are sending mail with results at report@fotonower.com args[1384971123] : ('0.064230441106751',) no score found for photo 1384971123 We are sending mail with results at report@fotonower.com args[1384971120] : ('0.064230441106751',) no score found for photo 1384971120 We are sending mail with results at report@fotonower.com args[1384971118] : ('0.064230441106751',) no score found for photo 1384971118 We are sending mail with results at report@fotonower.com args[1384971117] : ('0.064230441106751',) no score found for photo 1384971117 We are sending mail with results at report@fotonower.com args[1384971116] : ('0.064230441106751',) no score found for photo 1384971116 We are sending mail with results at report@fotonower.com refus_total : 0.064230441106751 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018974 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_P27018974_19-09-2025_02_01_00.pdf results_Auto_P27018974_19-09-2025_02_01_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_01_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','27018974','results_Auto_P27018974_19-09-2025_02_01_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_01_00.pdf','pdf','','0.28','0.064230441106751') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27018974]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] map_info['map_portfolio_photo'] : {27018974: [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116, 1384971075, 1384971073, 1384971072, 1384971070, 1384971069, 1384971068, 1384971059, 1384971056, 1384971054, 1384971038, 1384971036, 1384971032, 1384971030, 1384971027, 1384970980, 1384970977, 1384970970, 1384970963, 1384970960, 1384970945, 1384970944, 1384970942, 1384970881, 1384970878, 1384970836, 1384970833, 1384970831, 1384970829, 1384970827, 1384970825, 1384970819, 1384970817, 1384970814, 1384970812, 1384970801, 1384970784, 1384970783, 1384970779, 1384970775, 1384970745, 1384970743, 1384970739, 1384970737, 1384970735, 1384970713, 1384970711, 1384970707, 1384970706, 1384970705, 1384970692, 1384970690, 1384970688]} final : False mtd_id 4302 list_pids : [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] 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, '3743903') ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '27018974', '1384971147', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903')] time used for this insertion : 0.08722805976867676 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.8864874839782715 time spend to save output : 0.08755755424499512 total time spend for step 4 : 5.974045038223267 step5:split_time_score Fri Sep 19 02:01:05 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 : ['27018974'] 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 : [('27018974',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27018974) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1384971116: {'path': 'temp/1758240059_952079_1384971116_bdae6cd632c1c38d72c0e92fba422c06.jpg', 'extension': 'jpg'}, 1384971117: {'path': 'temp/1758240059_952079_1384971117_d5051497a891d6ba30203a4dbcb45e2b.jpg', 'extension': 'jpg'}, 1384971118: {'path': 'temp/1758240059_952079_1384971118_fa34463787d0026855a6e479fe9eeec0.jpg', 'extension': 'jpg'}, 1384971120: {'path': 'temp/1758240059_952079_1384971120_ac494bca7dca50ba3b04b07f8d321bf2.jpg', 'extension': 'jpg'}, 1384971123: {'path': 'temp/1758240059_952079_1384971123_6dec112d08f491de3d6066558e4c4c9f.jpg', 'extension': 'jpg'}, 1384971125: {'path': 'temp/1758240059_952079_1384971125_6ee0e649affe09c4e6057db8ec76c409.jpg', 'extension': 'jpg'}, 1384971141: {'path': 'temp/1758240059_952079_1384971141_bc763eaf20066ee28cfdaa63c6b9a1cc.jpg', 'extension': 'jpg'}, 1384971144: {'path': 'temp/1758240059_952079_1384971144_32890cb487c871f6caaad6268b526a08.jpg', 'extension': 'jpg'}, 1384971147: {'path': 'temp/1758240059_952079_1384971147_eb1926e8e3a839d90c48633a51b5aedd.jpg', 'extension': 'jpg'}, 1384971130: {'path': 'temp/1758240059_952079_1384971130_86c5f85be9710895e9b1b5170e8ec3b8.jpg', 'extension': 'jpg'}, 1384971133: {'path': 'temp/1758240059_952079_1384971133_7df9deddbfc8d73db6e61d253a334436.jpg', 'extension': 'jpg'}, 1384971136: {'path': 'temp/1758240059_952079_1384971136_7d1c9b10341672a4703c0f58541287a2.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 = 27018974; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27018974 group by h (('01', 64),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27018974 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 (27018974) 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 (27018974) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 19092025 27018974 Nombre de photos uploadées : 64 / 23040 (0%) 19092025 27018974 Nombre de photos taguées (types de déchets): 0 / 64 (0%) 19092025 27018974 Nombre de photos taguées (volume) : 0 / 64 (0%) [{'photo_id': 1384970692, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/c629ee49f5f327357ab947c42bd60197.jpg', 'username': None, 'uploaded_at': 1758239167, 'text': 'image_19092025_01_45_03_010137m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1384970690, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/103162d2a8523a71fb7fb3de94249fa7.jpg', 'username': None, 'uploaded_at': 1758239167, 'text': 'image_19092025_01_45_24_010133m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1384970688, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/7919e53282d71dd87832b616cb6f1fcc.jpg', 'username': None, 'uploaded_at': 1758239167, 'text': 'image_19092025_01_45_44_010137m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1384970713, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/45e0860f97f445aa0cd87008f729c63e.jpg', 'username': None, 'uploaded_at': 1758239227, 'text': 'image_19092025_01_45_54_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.814697265625e-06 elapsed_time : order_list_meta_photo_and_scores 9.775161743164062e-06 ???????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003289937973022461 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27018974, '2025-09-19' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-09-19' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2316270,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.19992685317993164 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= 2316270 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27016220, 'dashboard_result_id': 15389092, '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_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27016631, 'dashboard_result_id': 15389093, '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_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27017094, 'dashboard_result_id': 15389094, '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_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27017607, 'dashboard_result_id': 15389095, '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_P27017607_19-09-2025_00_58_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27018652, 'dashboard_result_id': 15389096, '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_P27018652_19-09-2025_01_33_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018654, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018655, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018657, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018658, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018662, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018665, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27018718, 'dashboard_result_id': 15389097, '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_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2323993, 'mtr_portfolio_id': 27018974, 'dashboard_result_id': 15389098, '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_P27018974_19-09-2025_01_59_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27016220 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': 3743435, 'mtr_portfolio_id': 27016220, 'created_at': datetime.datetime(2025, 9, 19, 0, 19), 'result': '0.0367684899895796', 'result_long': None, 'result_double': None}] Qualite : 0.0367684899895796 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27016220 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016220_19-09-2025_00_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27016220 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_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, 'pht': 3726}}" where mtr_portfolio_id = 27016220 and dashboard_run_id = 2323995 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`=27016220 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389092, 0.0367684899895796, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, '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 = 27016631 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': 3743481, 'mtr_portfolio_id': 27016631, 'created_at': datetime.datetime(2025, 9, 19, 0, 32, 58), 'result': '0.02573315192667667', 'result_long': None, 'result_double': None}] Qualite : 0.02573315192667667 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27016631 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016631_19-09-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27016631 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_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, 'pht': 3726}}" where mtr_portfolio_id = 27016631 and dashboard_run_id = 2323995 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`=27016631 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389093, 0.02573315192667667, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, '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 = 27017094 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': 3743586, 'mtr_portfolio_id': 27017094, 'created_at': datetime.datetime(2025, 9, 19, 0, 48, 58), 'result': '0.049743802151738764', 'result_long': None, 'result_double': None}] Qualite : 0.049743802151738764 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27017094 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017094_19-09-2025_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27017094 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_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, 'pht': 3726}}" where mtr_portfolio_id = 27017094 and dashboard_run_id = 2323995 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`=27017094 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389094, 0.049743802151738764, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, '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 = 27017607 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': 3743683, 'mtr_portfolio_id': 27017607, 'created_at': datetime.datetime(2025, 9, 19, 1, 22, 59), 'result': '0.044356041169144905', 'result_long': None, 'result_double': None}] Qualite : 0.044356041169144905 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27017607 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017607_19-09-2025_01_23_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27017607 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_P27017607_19-09-2025_01_23_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, 'pht': 3726}}" where mtr_portfolio_id = 27017607 and dashboard_run_id = 2323995 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`=27017607 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389095, 0.044356041169144905, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017607_19-09-2025_01_23_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, '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 = 27018652 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 = 27018652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 27018652 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27018652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27018652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27018652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018652_19-09-2025_01_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27018652 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_P27018652_19-09-2025_01_33_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018654, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018655, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018657, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018658, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018662, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018665, 'pht': 3726}}" where mtr_portfolio_id = 27018652 and dashboard_run_id = 2323989 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 = 27018718 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': 3743870, 'mtr_portfolio_id': 27018718, 'created_at': datetime.datetime(2025, 9, 19, 1, 46, 58), 'result': '0.0857532345072127', 'result_long': None, 'result_double': None}] Qualite : 0.0857532345072127 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27018718 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018718_19-09-2025_01_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27018718 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_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, 'pht': 3726}}" where mtr_portfolio_id = 27018718 and dashboard_run_id = 2323995 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`=27018718 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389097, 0.0857532345072127, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, '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 = 27018974 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': 3743903, 'mtr_portfolio_id': 27018974, 'created_at': datetime.datetime(2025, 9, 19, 2, 0, 59), 'result': '0.064230441106751', 'result_long': None, 'result_double': None}] Qualite : 0.064230441106751 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27018974 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_01_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27018974 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_P27018974_19-09-2025_02_01_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, 'pht': 3726}}" where mtr_portfolio_id = 27018974 and dashboard_run_id = 2323995 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`=27018974 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15389098, 0.064230441106751, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_01_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27016220,27016631,27017094,27017607,27018652,27018718,27018974) result : ((1384957280,), (1384957283,), (1384957285,), (1384957286,), (1384957344,), (1384957379,), (1384957444,), (1384957513,), (1384957566,), (1384957957,), (1384958006,), (1384958061,), (1384958113,), (1384958163,), (1384958744,), (1384958797,), (1384959190,), (1384959193,), (1384959197,), (1384959215,), (1384959624,), (1384959654,), (1384959682,), (1384959702,), (1384959722,), (1384959891,), (1384959916,), (1384959917,), (1384959920,), (1384959929,), (1384959964,), (1384959966,), (1384959969,), (1384960051,), (1384960052,), (1384960076,), (1384960082,), (1384960128,), (1384960135,), (1384960138,), (1384960142,), (1384960145,), (1384960146,), (1384960154,), (1384960156,), (1384960158,), (1384960250,), (1384960275,), (1384960290,), (1384960295,), (1384960316,), (1384960437,), (1384960445,), (1384960446,), (1384960449,), (1384960494,), (1384960501,), (1384960502,), (1384960504,), (1384960508,), (1384960510,), (1384960573,), (1384960597,), (1384960626,), (1384960653,), (1384960666,), (1384960668,), (1384960673,), (1384960685,), (1384960687,), (1384960689,), (1384960691,), (1384960705,), (1384960693,), (1384960698,), (1384960902,), (1384960975,), (1384961080,), (1384961159,), (1384961894,), (1384961939,), (1384961940,), (1384961942,), (1384961945,), (1384961968,), (1384961972,), (1384961975,), (1384961976,), (1384961979,), (1384962309,), (1384962365,), (1384962370,), (1384962544,), (1384962546,), (1384962547,), (1384962549,), (1384962567,), (1384962590,), (1384962692,), (1384962699,), (1384962701,), (1384962714,), (1384962718,), (1384962810,), (1384962811,), (1384962812,), (1384962814,), (1384962817,), (1384962838,), (1384962845,), (1384962848,), (1384962850,), (1384962852,), (1384963002,), (1384963026,), (1384963048,), (1384963073,), (1384963098,), (1384963122,), (1384963186,), (1384963191,), (1384963198,), (1384963199,), (1384963200,), (1384963203,), (1384963207,), (1384963210,), (1384963218,), (1384963274,), (1384963284,), (1384963553,), (1384963555,), (1384963557,), (1384963560,), (1384963573,), (1384963574,), (1384963577,), (1384963581,), (1384963684,), (1384963703,), (1384963706,), (1384963730,), (1384963752,), (1384963635,), (1384963637,), (1384963654,), (1384963778,), (1384963779,), (1384963782,), (1384963785,), (1384963788,), (1384963791,), (1384963804,), (1384963805,), (1384963806,), (1384963808,), (1384963837,), (1384963839,), (1384963841,), (1384963844,), (1384963847,), (1384963851,), (1384963868,), (1384963869,), (1384963871,), (1384963874,), (1384963875,), (1384963878,), (1384963885,), (1384963887,), (1384963888,), (1384963890,), (1384963891,), (1384963893,), (1384963900,), (1384963907,), (1384963923,), (1384963949,), (1384963954,), (1384963958,), (1384963962,), (1384963965,), (1384963968,), (1384963997,), (1384963998,), (1384964000,), (1384964007,), (1384964014,), (1384964018,), (1384964040,), (1384964041,), (1384964042,), (1384964044,), (1384964075,), (1384964077,), (1384964079,), (1384964081,), (1384964085,), (1384964099,), (1384964101,), (1384964103,), (1384964106,), (1384964135,), (1384964136,), (1384964137,), (1384964139,), (1384964142,), (1384964164,), (1384964171,), (1384964217,), (1384964218,), (1384964219,), (1384964222,), (1384964225,), (1384964227,), (1384964275,), (1384964254,), (1384964256,), (1384964258,), (1384964261,), (1384964451,), (1384964475,), (1384964480,), (1384964492,), (1384964634,), (1384964646,), (1384964657,), (1384964660,), (1384964664,), (1384964748,), (1384964772,), (1384964795,), (1384964807,), (1384964809,), (1384964881,), (1384964882,), (1384964908,), (1384964910,), (1384964912,), (1384964917,), (1384964922,), (1384964960,), (1384964961,), (1384964962,), (1384964965,), (1384964991,), (1384964997,), (1384965058,), (1384965063,), (1384965064,), (1384965066,), (1384965086,), (1384965116,), (1384965117,), (1384965118,), (1384965141,), (1384965142,), (1384965143,), (1384965146,), (1384965150,), (1384965162,), (1384965164,), (1384965168,), (1384965230,), (1384965238,), (1384965239,), (1384965244,), (1384965307,), (1384965309,), (1384965311,), (1384965314,), (1384965318,), (1384965330,), (1384965333,), (1384965337,), (1384965339,), (1384965343,), (1384965367,), (1384965369,), (1384965371,), (1384965374,), (1384965377,), (1384965379,), (1384965464,), (1384965489,), (1384965513,), (1384969912,), (1384969982,), (1384970232,), (1384970225,), (1384970227,), (1384970229,), (1384970300,), (1384970303,), (1384970305,), (1384970372,), (1384970373,), (1384970374,), (1384970375,), (1384970427,), (1384970438,), (1384970442,), (1384970452,), (1384970454,), (1384970468,), (1384970469,), (1384970470,), (1384970471,), (1384970473,), (1384970498,), (1384970499,), (1384970517,), (1384970523,), (1384970534,), (1384970558,), (1384970560,), (1384970562,), (1384970564,), (1384970566,), (1384970573,), (1384970575,), (1384970577,), (1384970579,), (1384970581,), (1384970583,), (1384970589,), (1384970591,), (1384970593,), (1384970596,), (1384970617,), (1384970618,), (1384970619,), (1384970620,), (1384970622,), (1384970636,), (1384970638,), (1384970640,), (1384970643,), (1384970653,), (1384970655,), (1384970657,), (1384970695,), (1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'19092025': {'nb_upload': 64, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27018974]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] map_info['map_portfolio_photo'] : {27018974: [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116, 1384971075, 1384971073, 1384971072, 1384971070, 1384971069, 1384971068, 1384971059, 1384971056, 1384971054, 1384971038, 1384971036, 1384971032, 1384971030, 1384971027, 1384970980, 1384970977, 1384970970, 1384970963, 1384970960, 1384970945, 1384970944, 1384970942, 1384970881, 1384970878, 1384970836, 1384970833, 1384970831, 1384970829, 1384970827, 1384970825, 1384970819, 1384970817, 1384970814, 1384970812, 1384970801, 1384970784, 1384970783, 1384970779, 1384970775, 1384970745, 1384970743, 1384970739, 1384970737, 1384970735, 1384970713, 1384970711, 1384970707, 1384970706, 1384970705, 1384970692, 1384970690, 1384970688]} final : True mtd_id 4302 list_pids : [1384971147, 1384971144, 1384971141, 1384971136, 1384971133, 1384971130, 1384971125, 1384971123, 1384971120, 1384971118, 1384971117, 1384971116] Looping around the photos to save general results len do output : 1 /27018974Didn'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, '3743903') ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903') ('4302', None, None, None, None, None, None, None, '3743903') ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '27018974', 'None', None, None, None, None, '3743903'), ('4302', '27018974', '1384971147', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971144', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971141', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971136', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971133', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971130', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971125', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971123', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971120', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971118', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971117', None, None, None, None, None, '3743903'), ('4302', '27018974', '1384971116', None, None, None, None, None, '3743903')] time used for this insertion : 0.09247708320617676 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7260982990264893 time spend to save output : 0.09283638000488281 total time spend for step 5 : 0.8189346790313721 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 (3743903) 2.43user 2.48system 0:11.83elapsed 41%CPU (0avgtext+0avgdata 161084maxresident)k 2712inputs+16016outputs (34major+75938minor)pagefaults 0swaps