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 : 1624582 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 (3685923) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3685923) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695382 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3685923'] with mtr_portfolio_ids : ['26695382'] and first list_photo_ids : [] new path : /proc/1624582/ Name: python3 Umask: 0002 State: R (running) Tgid: 1624582 Ngid: 0 Pid: 1624582 PPid: 1624581 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1624582 NSpid: 1624582 NSpgid: 1623686 NSsid: 1623686 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99660 kB VmRSS: 99660 kB RssAnon: 60164 kB RssFile: 39496 kB RssShmem: 0 kB VmData: 866004 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: 55 nonvoluntary_ctxt_switches: 86 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1624582', 'Ngid': '0', 'Pid': '1624582', 'PPid': '1624581', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1624582', 'NSpid': '1624582', 'NSpgid': '1623686', 'NSsid': '1623686', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99660 kB', 'VmRSS': '99660 kB', 'RssAnon': '60164 kB', 'RssFile': '39496 kB', 'RssShmem': '0 kB', 'VmData': '866004 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': '55', 'nonvoluntary_ctxt_switches': '86'} ('datou_batch_current', '1624582', '1107252', '0', '1107252', '866004', '99660', b'', 'marlene', '3685923') 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 (26695382) 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 (3685923 ) ) 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 (26695382) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1382804538, 'portfolio_id': 26695382}, {'photo_id': 1382804536, 'portfolio_id': 26695382}, {'photo_id': 1382804522, 'portfolio_id': 26695382}, {'photo_id': 1382804520, 'portfolio_id': 26695382}, {'photo_id': 1382804517, 'portfolio_id': 26695382}, {'photo_id': 1382804511, 'portfolio_id': 26695382}, {'photo_id': 1382804507, 'portfolio_id': 26695382}, {'photo_id': 1382804504, 'portfolio_id': 26695382}, {'photo_id': 1382804486, 'portfolio_id': 26695382}, {'photo_id': 1382804484, 'portfolio_id': 26695382}, {'photo_id': 1382804483, 'portfolio_id': 26695382}] map_portfolio_id_photo_id: {26695382: [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483]} ##### 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.03193020820617676 #### 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 Tue Sep 9 19:48: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 (26695382) 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 : 26695382 get user id for portfolio 26695382 get sub ptf for main ptf 26695382, type 3726 and hashtags ['mal_croppe', 'Teint_Dans_La_Masse', 'Carton_brun', 'kraft', 'environnement', 'autre_refus', 'cartonnette', 'papier', 'plastique', 'Carton_gris', 'metal', 'flou'] 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`=26695382 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) 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`=26695382 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[26695382, 26695387, 3726, 0.5, 2107755527, 979], [26695382, 26695388, 3726, 0.5, 2107752385, 979], [26695382, 26695389, 3726, 0.5, 2107753024, 979], [26695382, 26695390, 3726, 0.5, 493202403, 979], [26695382, 26695391, 3726, 0.5, 493012381, 979], [26695382, 26695392, 3726, 0.5, 2107752406, 979], [26695382, 26695393, 3726, 0.5, 702398920, 979], [26695382, 26695394, 3726, 0.5, 492668766, 979], [26695382, 26695395, 3726, 0.5, 492725882, 979], [26695382, 26695396, 3726, 0.5, 2107753020, 979], [26695382, 26695397, 3726, 0.5, 492628673, 979], [26695382, 26695398, 3726, 0.5, 492777938, 979]] 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`=26695382 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) 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`=26695382 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26695382, 'sub_port_id': 26695387, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994097, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 26695382, 'sub_port_id': 26695388, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994098, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'Carton_brun': {'main_port_id': 26695382, 'sub_port_id': 26695389, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994099, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'kraft': {'main_port_id': 26695382, 'sub_port_id': 26695390, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994100, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'environnement': {'main_port_id': 26695382, 'sub_port_id': 26695391, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994101, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'autre_refus': {'main_port_id': 26695382, 'sub_port_id': 26695392, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994102, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'cartonnette': {'main_port_id': 26695382, 'sub_port_id': 26695393, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994103, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'papier': {'main_port_id': 26695382, 'sub_port_id': 26695394, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994104, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'plastique': {'main_port_id': 26695382, 'sub_port_id': 26695395, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994105, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'Carton_gris': {'main_port_id': 26695382, 'sub_port_id': 26695396, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994106, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'metal': {'main_port_id': 26695382, 'sub_port_id': 26695397, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994107, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}, 'flou': {'main_port_id': 26695382, 'sub_port_id': 26695398, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994108, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 48, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26695387 , 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=26695382 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 (26695387) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695388 , 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=26695382 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 (26695388) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695389 , 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=26695382 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 (26695389) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695390 , 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=26695382 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 (26695390) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695391 , 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=26695382 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 (26695391) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695392 , 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=26695382 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 (26695392) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695393 , 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=26695382 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 (26695393) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695394 , 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=26695382 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 (26695394) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695395 , 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=26695382 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 (26695395) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695396 , 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=26695382 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 (26695396) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695397 , 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=26695382 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 (26695397) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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 26695398 , 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=26695382 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 (26695398) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26695382) result : ((1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) 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`=26695382 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) 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`=26695382 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__09092025_19_45_04_010169_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[26695382, 26695400, 4417, 0.5, 2107755527, 979], [26695382, 26695401, 4417, 0.5, 2107752385, 979], [26695382, 26695402, 4417, 0.5, 2107753024, 979], [26695382, 26695403, 4417, 0.5, 493202403, 979], [26695382, 26695404, 4417, 0.5, 493012381, 979], [26695382, 26695405, 4417, 0.5, 2107752406, 979], [26695382, 26695406, 4417, 0.5, 702398920, 979], [26695382, 26695407, 4417, 0.5, 492668766, 979], [26695382, 26695408, 4417, 0.5, 492725882, 979], [26695382, 26695409, 4417, 0.5, 2107753020, 979], [26695382, 26695410, 4417, 0.5, 492628673, 979], [26695382, 26695411, 4417, 0.5, 492777938, 979]] 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`=26695382 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) 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`=26695382 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','Carton_brun','kraft','environnement','autre_refus','cartonnette','papier','plastique','Carton_gris','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26695382, 'sub_port_id': 26695400, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994109, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 26695382, 'sub_port_id': 26695401, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994110, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'Carton_brun': {'main_port_id': 26695382, 'sub_port_id': 26695402, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994111, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'kraft': {'main_port_id': 26695382, 'sub_port_id': 26695403, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994112, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'environnement': {'main_port_id': 26695382, 'sub_port_id': 26695404, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994113, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'autre_refus': {'main_port_id': 26695382, 'sub_port_id': 26695405, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994114, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'cartonnette': {'main_port_id': 26695382, 'sub_port_id': 26695406, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994115, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'papier': {'main_port_id': 26695382, 'sub_port_id': 26695407, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994116, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'plastique': {'main_port_id': 26695382, 'sub_port_id': 26695408, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994117, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'Carton_gris': {'main_port_id': 26695382, 'sub_port_id': 26695409, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994118, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'metal': {'main_port_id': 26695382, 'sub_port_id': 26695410, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994119, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}, 'flou': {'main_port_id': 26695382, 'sub_port_id': 26695411, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17994120, 'last_updated_at': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 19, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 19, 49, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695400,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695387 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695401,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695388 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695402,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695389 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695403,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695390 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695404,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695391 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695405,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695392 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695406,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695393 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695407,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695394 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695408,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695395 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695409,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695396 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695410,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695397 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26695411,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26695398 lien utilise dans velours : https://marlene.fotonower.com/velours/26695400,26695401,26695402,26695403,26695404,26695405,26695406,26695407,26695408,26695409,26695410,26695411?tags=mal_croppe,Teint_Dans_La_Masse,Carton_brun,kraft,environnement,autre_refus,cartonnette,papier,plastique,Carton_gris,metal,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26695382]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] map_info['map_portfolio_photo'] : {26695382: [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483]} final : False mtd_id 4302 list_pids : [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] Looping around the photos to save general results len do output : 1 /26695382. 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, '3685923') ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923') 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', None, '26695382', "{'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398}", None, None, None, None, '3685923'), ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923')] time used for this insertion : 0.018126249313354492 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.4576735496521 time spend to save output : 0.018431901931762695 total time spend for step 1 : 4.476105451583862 step2:final Tue Sep 9 19:49:02 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 (26695382) 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 26695382 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1382804486,1382804538,1382804484,1382804536,1382804483,1382804522,1382804520,1382804517,1382804511,1382804507,1382804504); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26695382]) Inside saveOutput : final : False verbose : True original output for save of step final : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} new output for save of step final : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] map_info['map_portfolio_photo'] : {26695382: [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483]} final : False mtd_id 4302 list_pids : [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] Looping around the photos to save general results len do output : 11 /1382804538.Didn't retrieve data . /1382804536.Didn't retrieve data . /1382804522.Didn't retrieve data . /1382804520.Didn't retrieve data . /1382804517.Didn't retrieve data . /1382804511.Didn't retrieve data . /1382804507.Didn't retrieve data . /1382804504.Didn't retrieve data . /1382804486.Didn't retrieve data . /1382804484.Didn't retrieve data . /1382804483.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, '3685923') ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '26695382', '1382804538', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804536', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804522', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804520', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804517', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804511', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804507', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804504', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804486', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804484', '0.0', None, None, None, None, '3685923'), ('4302', '26695382', '1382804483', '0.0', None, None, None, None, '3685923')] time used for this insertion : 0.018793106079101562 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.02310776710510254 time spend to save output : 0.019425153732299805 total time spend for step 2 : 0.042532920837402344 step3:velours_tree Tue Sep 9 19:49:02 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 : {26695382: [{'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398}]} input_args_next_step : {26695382: ()} output_args : {26695382: [{'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398}]} args : 26695382 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 : ({'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26695382) 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([26695382]) 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.3338797092437744 time spend to save output : 7.653236389160156e-05 total time spend for step 3 : 0.333956241607666 step4:send_mail_cod Tue Sep 9 19:49:02 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 : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} input_args_next_step : {1382804538: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804538 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804536 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804522 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804520 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804517 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804511 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804507 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804504 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804486 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804484 depend.output_id : 0 input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ()} output_args : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',)} args : 1382804483 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 : {26695382: [{'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398}]} input_args_next_step : {1382804538: ('0.0',), 1382804536: ('0.0',), 1382804522: ('0.0',), 1382804520: ('0.0',), 1382804517: ('0.0',), 1382804511: ('0.0',), 1382804507: ('0.0',), 1382804504: ('0.0',), 1382804486: ('0.0',), 1382804484: ('0.0',), 1382804483: ('0.0',), 26695382: ()} output_args : {26695382: [{'mal_croppe': 26695387, 'Teint_Dans_La_Masse': 26695388, 'Carton_brun': 26695389, 'kraft': 26695390, 'environnement': 26695391, 'autre_refus': 26695392, 'cartonnette': 26695393, 'papier': 26695394, 'plastique': 26695395, 'Carton_gris': 26695396, 'metal': 26695397, 'flou': 26695398}]} args : 26695382 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 :12, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26695382) 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 (1382804538,1382804536,1382804522,1382804520,1382804517,1382804511,1382804507,1382804504,1382804486,1382804484,1382804483) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1382804483 begin to download photo : 1382804504 begin to download photo : 1382804517 begin to download photo : 1382804536 download finish for photo 1382804483 begin to download photo : 1382804484 download finish for photo 1382804517 begin to download photo : 1382804520 download finish for photo 1382804504 begin to download photo : 1382804507 download finish for photo 1382804536 begin to download photo : 1382804538 download finish for photo 1382804484 begin to download photo : 1382804486 download finish for photo 1382804520 begin to download photo : 1382804522 download finish for photo 1382804507 begin to download photo : 1382804511 download finish for photo 1382804538 download finish for photo 1382804522 download finish for photo 1382804511 download finish for photo 1382804486 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette266953871757440142/ imagette266953901757440142/ imagette266953921757440143/ imagette266953931757440143/ imagette266953951757440143/ imagette266953971757440143/ imagette266953981757440143/ imagette266953881757440143/ imagette266953891757440143/ imagette266953961757440143/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P26695382_09-09-2025_19_49_02.pdf 26695387 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=26695387 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953871757440142 26695390 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=26695390 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953901757440142 26695392 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=26695392 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953921757440143 26695393 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=26695393 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953931757440143 26695395 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=26695395 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953951757440143 26695397 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=26695397 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953971757440143 26695398 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=26695398 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953981757440143 26695388 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=26695388 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953881757440143 26695389 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=26695389 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953891757440143 26695396 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=26695396 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266953961757440143 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26695382 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26695400,26695401,26695402,26695403,26695404,26695405,26695406,26695407,26695408,26695409,26695410,26695411?tags=mal_croppe,Teint_Dans_La_Masse,Carton_brun,kraft,environnement,autre_refus,cartonnette,papier,plastique,Carton_gris,metal,flou your option no_mail is active, we will not send the real mail to your client args[1382804538] : ('0.0',) no score found for photo 1382804538 We are sending mail with results at report@fotonower.com args[1382804536] : ('0.0',) no score found for photo 1382804536 We are sending mail with results at report@fotonower.com args[1382804522] : ('0.0',) no score found for photo 1382804522 We are sending mail with results at report@fotonower.com args[1382804520] : ('0.0',) no score found for photo 1382804520 We are sending mail with results at report@fotonower.com args[1382804517] : ('0.0',) no score found for photo 1382804517 We are sending mail with results at report@fotonower.com args[1382804511] : ('0.0',) no score found for photo 1382804511 We are sending mail with results at report@fotonower.com args[1382804507] : ('0.0',) no score found for photo 1382804507 We are sending mail with results at report@fotonower.com args[1382804504] : ('0.0',) no score found for photo 1382804504 We are sending mail with results at report@fotonower.com args[1382804486] : ('0.0',) no score found for photo 1382804486 We are sending mail with results at report@fotonower.com args[1382804484] : ('0.0',) no score found for photo 1382804484 We are sending mail with results at report@fotonower.com args[1382804483] : ('0.0',) no score found for photo 1382804483 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=26695382 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_P26695382_09-09-2025_19_49_02.pdf results_Auto_P26695382_09-09-2025_19_49_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26695382_09-09-2025_19_49_02.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','26695382','results_Auto_P26695382_09-09-2025_19_49_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26695382_09-09-2025_19_49_02.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26695382]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] map_info['map_portfolio_photo'] : {26695382: [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483]} final : False mtd_id 4302 list_pids : [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] 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, '3685923') ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26695382', '1382804538', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923')] time used for this insertion : 0.024502277374267578 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.651740550994873 time spend to save output : 0.024775981903076172 total time spend for step 4 : 1.6765165328979492 step5:split_time_score Tue Sep 9 19:49:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26695382'] 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 : [('26695382',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26695382) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1382804536: {'path': 'temp/1757440142_1624582_1382804536_1797d636569abac9d3a6721e764a5457.jpg', 'extension': 'jpg'}, 1382804538: {'path': 'temp/1757440142_1624582_1382804538_0cd6258e35ae7807959b7660fa0cd09c.jpg', 'extension': 'jpg'}, 1382804517: {'path': 'temp/1757440142_1624582_1382804517_c493b9a1f0d1822deb9955a9d1d41ae1.jpg', 'extension': 'jpg'}, 1382804520: {'path': 'temp/1757440142_1624582_1382804520_3df990682400feba4c98911ac27775c1.jpg', 'extension': 'jpg'}, 1382804522: {'path': 'temp/1757440142_1624582_1382804522_88f8f6651c3dd3562ea0c3ed457ab1fd.jpg', 'extension': 'jpg'}, 1382804504: {'path': 'temp/1757440142_1624582_1382804504_da7fa8718d746f9e592f1090b7f0df81.jpg', 'extension': 'jpg'}, 1382804507: {'path': 'temp/1757440142_1624582_1382804507_75fe3bebd2db38114e9603961ca737a1.jpg', 'extension': 'jpg'}, 1382804511: {'path': 'temp/1757440142_1624582_1382804511_ff2cd988a37487029c3dc93baffa726d.jpg', 'extension': 'jpg'}, 1382804483: {'path': 'temp/1757440142_1624582_1382804483_49d001aed14a6f6514ec37bd0d2e899d.jpg', 'extension': 'jpg'}, 1382804484: {'path': 'temp/1757440142_1624582_1382804484_cafa9da91b9c088e23604bc094fa5891.jpg', 'extension': 'jpg'}, 1382804486: {'path': 'temp/1757440142_1624582_1382804486_bdb9df03386fb668e477bac6dd745da2.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 = 26695382; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26695382 group by h (('19', 11),) 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=26695382 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 (26695382) 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 (26695382) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09092025 26695382 Nombre de photos uploadées : 11 / 23040 (0%) 09092025 26695382 Nombre de photos taguées (types de déchets): 0 / 11 (0%) 09092025 26695382 Nombre de photos taguées (volume) : 0 / 11 (0%) [{'photo_id': 1382804486, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/bdb9df03386fb668e477bac6dd745da2.jpg', 'username': None, 'uploaded_at': 1757439968, 'text': 'image_09092025_19_45_04_10169.jpg'}, {'photo_id': 1382804538, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/0cd6258e35ae7807959b7660fa0cd09c.jpg', 'username': None, 'uploaded_at': 1757440078, 'text': 'image_09092025_19_45_04_10169.jpg'}, {'photo_id': 1382804484, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/cafa9da91b9c088e23604bc094fa5891.jpg', 'username': None, 'uploaded_at': 1757439968, 'text': 'image_09092025_19_45_14_10136.jpg'}, {'photo_id': 1382804536, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/1797d636569abac9d3a6721e764a5457.jpg', 'username': None, 'uploaded_at': 1757440078, 'text': 'image_09092025_19_45_14_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ??????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005679130554199219 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 26695382, '2025-09-09' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-09-09' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2253343,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.3589606285095215 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= 2253343 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2253343, 'dashboard_run_id': 2266485, 'mtr_portfolio_id': 26694004, 'dashboard_result_id': 14959360, '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_P26694004_09-09-2025_19_45_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694014, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694019, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694021, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694026, 'pht': 3726}}"}, {'dashboat_entry_day': 2253343, 'dashboard_run_id': 2266485, 'mtr_portfolio_id': 26694568, 'dashboard_result_id': 14959361, '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_P26694568_09-09-2025_19_43_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694577, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694579, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694581, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694582, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694583, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694587, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694588, 'pht': 3726}}"}, {'dashboat_entry_day': 2253343, 'dashboard_run_id': 2266485, 'mtr_portfolio_id': 26694951, 'dashboard_result_id': 14959363, '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_P26694951_09-09-2025_19_47_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694976, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694977, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694982, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694983, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694985, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694986, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694987, 'pht': 3726}}"}, {'dashboat_entry_day': 2253343, 'dashboard_run_id': 2266485, 'mtr_portfolio_id': 26695382, 'dashboard_result_id': 14959364, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26694004 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': 3685684, 'mtr_portfolio_id': 26694004, 'created_at': datetime.datetime(2025, 9, 9, 19, 45, 3), 'result': '0.05744601206508723', 'result_long': None, 'result_double': None}] Qualite : 0.05744601206508723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26694004 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694004_09-09-2025_19_45_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26694004 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_P26694004_09-09-2025_19_45_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694014, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694019, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694021, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694026, 'pht': 3726}}" where mtr_portfolio_id = 26694004 and dashboard_run_id = 2266485 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`=26694004 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14959360, 0.05744601206508723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694004_09-09-2025_19_45_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694014, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694019, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694021, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694026, '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 = 26694568 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': 3685763, 'mtr_portfolio_id': 26694568, 'created_at': datetime.datetime(2025, 9, 9, 19, 43, 1), 'result': '0.0324728289756867', 'result_long': None, 'result_double': None}] Qualite : 0.0324728289756867 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26694568 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694568_09-09-2025_19_43_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26694568 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_P26694568_09-09-2025_19_43_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694577, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694579, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694581, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694582, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694583, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694587, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694588, 'pht': 3726}}" where mtr_portfolio_id = 26694568 and dashboard_run_id = 2266485 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`=26694568 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14959361, 0.0324728289756867, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694568_09-09-2025_19_43_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694577, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694579, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694581, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694582, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694583, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694587, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694588, '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 = 26694951 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': 3685844, 'mtr_portfolio_id': 26694951, 'created_at': datetime.datetime(2025, 9, 9, 19, 47, 2), 'result': '0.04037109921679125', 'result_long': None, 'result_double': None}] Qualite : 0.04037109921679125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26694951 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694951_09-09-2025_19_47_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26694951 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_P26694951_09-09-2025_19_47_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694976, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694977, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694982, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694983, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694985, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694986, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694987, 'pht': 3726}}" where mtr_portfolio_id = 26694951 and dashboard_run_id = 2266485 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`=26694951 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14959363, 0.04037109921679125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26694951_09-09-2025_19_47_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26694976, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26694977, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26694978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26694979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26694980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26694981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26694982, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26694983, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26694984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26694985, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26694986, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26694987, '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 = 26695382 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 = 26695382 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 = 26695382 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26695382 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 = 26695382 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 = 26695382 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26695382_09-09-2025_19_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26695382 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_P26695382_09-09-2025_19_49_02.pdf'}" where mtr_portfolio_id = 26695382 and dashboard_run_id = 2266485 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26694004,26694568,26694951,26695382) result : ((1382800770,), (1382800808,), (1382800848,), (1382800891,), (1382800935,), (1382801435,), (1382801489,), (1382801520,), (1382801546,), (1382801564,), (1382801581,), (1382801604,), (1382801625,), (1382801650,), (1382801680,), (1382801703,), (1382801776,), (1382801781,), (1382801783,), (1382801787,), (1382801789,), (1382801791,), (1382801801,), (1382801803,), (1382801806,), (1382801809,), (1382801812,), (1382801815,), (1382801827,), (1382801835,), (1382801857,), (1382801877,), (1382802102,), (1382802130,), (1382802155,), (1382802180,), (1382802204,), (1382802227,), (1382802315,), (1382802336,), (1382802357,), (1382802378,), (1382802407,), (1382802447,), (1382802527,), (1382802528,), (1382802555,), (1382802557,), (1382802582,), (1382802583,), (1382802606,), (1382802608,), (1382802632,), (1382802635,), (1382802659,), (1382802664,), (1382802758,), (1382802783,), (1382802808,), (1382802831,), (1382802851,), (1382802875,), (1382802964,), (1382802987,), (1382802998,), (1382803031,), (1382803060,), (1382803086,), (1382803174,), (1382803193,), (1382803197,), (1382803206,), (1382803231,), (1382803251,), (1382803292,), (1382803295,), (1382803299,), (1382803302,), (1382803303,), (1382803305,), (1382803322,), (1382803324,), (1382803329,), (1382803332,), (1382803336,), (1382803338,), (1382803346,), (1382803350,), (1382803361,), (1382803378,), (1382803390,), (1382803399,), (1382803409,), (1382803417,), (1382803422,), (1382803424,), (1382803427,), (1382803432,), (1382803450,), (1382803453,), (1382803458,), (1382803460,), (1382803469,), (1382803473,), (1382803505,), (1382803506,), (1382803642,), (1382803644,), (1382803645,), (1382803649,), (1382803722,), (1382803723,), (1382803750,), (1382803822,), (1382803826,), (1382804347,), (1382804350,), (1382804354,), (1382804357,), (1382804361,), (1382804366,), (1382804387,), (1382803490,), (1382803491,), (1382803492,), (1382803499,), (1382803539,), (1382803541,), (1382803543,), (1382803544,), (1382803546,), (1382803549,), (1382803559,), (1382803562,), (1382803566,), (1382803567,), (1382803569,), (1382803571,), (1382803579,), (1382803582,), (1382803585,), (1382803591,), (1382803598,), (1382803600,), (1382803602,), (1382803603,), (1382803606,), (1382803612,), (1382803615,), (1382803618,), (1382803634,), (1382803640,), (1382803659,), (1382803661,), (1382803663,), (1382803664,), (1382803667,), (1382803672,), (1382803702,), (1382803703,), (1382803706,), (1382803707,), (1382803710,), (1382803711,), (1382803713,), (1382803714,), (1382803718,), (1382803719,), (1382803731,), (1382803734,), (1382803737,), (1382803741,), (1382803744,), (1382803756,), (1382803759,), (1382803762,), (1382803765,), (1382803767,), (1382803769,), (1382803772,), (1382803774,), (1382803792,), (1382803796,), (1382803800,), (1382803802,), (1382803809,), (1382803812,), (1382803818,), (1382803820,), (1382803842,), (1382803845,), (1382803848,), (1382803852,), (1382803856,), (1382803858,), (1382803863,), (1382803866,), (1382803871,), (1382803876,), (1382803879,), (1382803882,), (1382803889,), (1382803893,), (1382803902,), (1382803904,), (1382803906,), (1382803908,), (1382803916,), (1382803918,), (1382803925,), (1382803926,), (1382803927,), (1382803928,), (1382803939,), (1382803942,), (1382803946,), (1382803948,), (1382803952,), (1382803963,), (1382803976,), (1382803978,), (1382803980,), (1382804007,), (1382804012,), (1382804014,), (1382804017,), (1382804020,), (1382804023,), (1382804047,), (1382804051,), (1382804112,), (1382804113,), (1382804115,), (1382804116,), (1382804211,), (1382804213,), (1382804215,), (1382804217,), (1382804221,), (1382804307,), (1382804342,), (1382803970,), (1382803972,), (1382803974,), (1382803990,), (1382803991,), (1382803993,), (1382803997,), (1382803999,), (1382804001,), (1382804041,), (1382804042,), (1382804044,), (1382804045,), (1382804059,), (1382804061,), (1382804063,), (1382804065,), (1382804069,), (1382804078,), (1382804093,), (1382804094,), (1382804096,), (1382804097,), (1382804101,), (1382804103,), (1382804109,), (1382804111,), (1382804128,), (1382804130,), (1382804131,), (1382804132,), (1382804133,), (1382804137,), (1382804150,), (1382804154,), (1382804158,), (1382804168,), (1382804171,), (1382804174,), (1382804180,), (1382804182,), (1382804186,), (1382804190,), (1382804196,), (1382804200,), (1382804209,), (1382804229,), (1382804230,), (1382804232,), (1382804234,), (1382804242,), (1382804256,), (1382804286,), (1382804289,), (1382804291,), (1382804292,), (1382804303,), (1382804322,), (1382804330,), (1382804334,), (1382804337,), (1382804339,), (1382804376,), (1382804377,), (1382804378,), (1382804379,), (1382804382,), (1382804399,), (1382804400,), (1382804408,), (1382804409,), (1382804414,), (1382804415,), (1382804420,), (1382804423,), (1382804425,), (1382804427,), (1382804431,), (1382804432,), (1382804437,), (1382804440,), (1382804443,), (1382804447,), (1382804457,), (1382804460,), (1382804462,), (1382804466,), (1382804469,), (1382804490,), (1382804541,), (1382804483,), (1382804484,), (1382804486,), (1382804504,), (1382804507,), (1382804511,), (1382804517,), (1382804520,), (1382804522,), (1382804536,), (1382804538,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09092025': {'nb_upload': 11, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26695382]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] map_info['map_portfolio_photo'] : {26695382: [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483]} final : True mtd_id 4302 list_pids : [1382804538, 1382804536, 1382804522, 1382804520, 1382804517, 1382804511, 1382804507, 1382804504, 1382804486, 1382804484, 1382804483] Looping around the photos to save general results len do output : 1 /26695382Didn'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, '3685923') ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923') ('4302', None, None, None, None, None, None, None, '3685923') ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923') 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', None, '26695382', 'None', None, None, None, None, '3685923'), ('4302', '26695382', '1382804538', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804536', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804522', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804520', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804517', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804511', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804507', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804504', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804486', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804484', None, None, None, None, None, '3685923'), ('4302', '26695382', '1382804483', None, None, None, None, None, '3685923')] time used for this insertion : 0.025890588760375977 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8857240676879883 time spend to save output : 0.026101350784301758 total time spend for step 5 : 0.91182541847229 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 (3685923) 1.96user 2.38system 0:10.75elapsed 40%CPU (0avgtext+0avgdata 160472maxresident)k 200inputs+5008outputs (1major+78880minor)pagefaults 0swaps