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 : 4044277 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 (3575401) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3575401) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153754 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3575401'] with mtr_portfolio_ids : ['26153754'] and first list_photo_ids : [] new path : /proc/4044277/ Name: python3 Umask: 0002 State: R (running) Tgid: 4044277 Ngid: 0 Pid: 4044277 PPid: 4044276 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4044277 NSpid: 4044277 NSpgid: 4043662 NSsid: 4043662 VmPeak: 1107248 kB VmSize: 1107248 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99760 kB VmRSS: 99760 kB RssAnon: 60164 kB RssFile: 39596 kB RssShmem: 0 kB VmData: 866000 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 552 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: 46 nonvoluntary_ctxt_switches: 100 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4044277', 'Ngid': '0', 'Pid': '4044277', 'PPid': '4044276', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4044277', 'NSpid': '4044277', 'NSpgid': '4043662', 'NSsid': '4043662', 'VmPeak': '1107248 kB', 'VmSize': '1107248 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99760 kB', 'VmRSS': '99760 kB', 'RssAnon': '60164 kB', 'RssFile': '39596 kB', 'RssShmem': '0 kB', 'VmData': '866000 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '552 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': '46', 'nonvoluntary_ctxt_switches': '100'} ('datou_batch_current', '4044277', '1107248', '0', '1107248', '866000', '99760', b'', 'marlene', '3575401') 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 (26153754) 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 (3575401 ) ) 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 (26153754) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1378609495, 'portfolio_id': 26153754}, {'photo_id': 1378609494, 'portfolio_id': 26153754}, {'photo_id': 1378609493, 'portfolio_id': 26153754}, {'photo_id': 1378609492, 'portfolio_id': 26153754}, {'photo_id': 1378609491, 'portfolio_id': 26153754}, {'photo_id': 1378609490, 'portfolio_id': 26153754}, {'photo_id': 1378609452, 'portfolio_id': 26153754}, {'photo_id': 1378609451, 'portfolio_id': 26153754}, {'photo_id': 1378609450, 'portfolio_id': 26153754}, {'photo_id': 1378609449, 'portfolio_id': 26153754}] map_portfolio_id_photo_id: {26153754: [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449]} ##### 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.034772396087646484 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Aug 22 16:03:30 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 (26153754) 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 : 26153754 get user id for portfolio 26153754 get sub ptf for main ptf 26153754, type 3726 and hashtags ['kraft', 'cartonnette', 'metal', 'autre_refus', 'Carton_gris', 'environnement', 'plastique', 'flou', 'Carton_brun', 'papier', 'Teint_Dans_La_Masse', 'mal_croppe'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26153754 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26153754 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_3726_mal_croppe_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)[[26153754, 26153786, 3726, 0.5, 493202403, 979], [26153754, 26153787, 3726, 0.5, 702398920, 979], [26153754, 26153788, 3726, 0.5, 492628673, 979], [26153754, 26153789, 3726, 0.5, 2107752406, 979], [26153754, 26153790, 3726, 0.5, 2107753020, 979], [26153754, 26153791, 3726, 0.5, 493012381, 979], [26153754, 26153792, 3726, 0.5, 492725882, 979], [26153754, 26153793, 3726, 0.5, 492777938, 979], [26153754, 26153794, 3726, 0.5, 2107753024, 979], [26153754, 26153795, 3726, 0.5, 492668766, 979], [26153754, 26153796, 3726, 0.5, 2107752385, 979], [26153754, 26153797, 3726, 0.5, 2107755527, 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`=26153754 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26153754 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 26153754, 'sub_port_id': 26153786, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617687, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'cartonnette': {'main_port_id': 26153754, 'sub_port_id': 26153787, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617688, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'metal': {'main_port_id': 26153754, 'sub_port_id': 26153788, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617689, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'autre_refus': {'main_port_id': 26153754, 'sub_port_id': 26153789, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617690, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'Carton_gris': {'main_port_id': 26153754, 'sub_port_id': 26153790, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617691, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'environnement': {'main_port_id': 26153754, 'sub_port_id': 26153791, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617692, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'plastique': {'main_port_id': 26153754, 'sub_port_id': 26153792, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617693, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'flou': {'main_port_id': 26153754, 'sub_port_id': 26153793, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617694, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'Carton_brun': {'main_port_id': 26153754, 'sub_port_id': 26153794, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617695, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'papier': {'main_port_id': 26153754, 'sub_port_id': 26153795, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617696, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 26153754, 'sub_port_id': 26153796, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617697, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}, 'mal_croppe': {'main_port_id': 26153754, 'sub_port_id': 26153797, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617698, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 31)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26153786 , 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=26153754 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 (26153786) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153787 , 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=26153754 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 (26153787) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153788 , 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=26153754 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 (26153788) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153789 , 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=26153754 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 (26153789) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153790 , 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=26153754 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 (26153790) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153791 , 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=26153754 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 (26153791) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153792 , 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=26153754 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 (26153792) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153793 , 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=26153754 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 (26153793) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153794 , 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=26153754 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 (26153794) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153795 , 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=26153754 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 (26153795) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153796 , 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=26153754 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 (26153796) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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 26153797 , 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=26153754 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 (26153797) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26153754) result : ((1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) 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`=26153754 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26153754 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_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__22082025_16_00_14_010211_4417_mal_croppe_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)[[26153754, 26153801, 4417, 0.5, 493202403, 979], [26153754, 26153802, 4417, 0.5, 702398920, 979], [26153754, 26153803, 4417, 0.5, 492628673, 979], [26153754, 26153804, 4417, 0.5, 2107752406, 979], [26153754, 26153805, 4417, 0.5, 2107753020, 979], [26153754, 26153806, 4417, 0.5, 493012381, 979], [26153754, 26153807, 4417, 0.5, 492725882, 979], [26153754, 26153808, 4417, 0.5, 492777938, 979], [26153754, 26153809, 4417, 0.5, 2107753024, 979], [26153754, 26153810, 4417, 0.5, 492668766, 979], [26153754, 26153811, 4417, 0.5, 2107752385, 979], [26153754, 26153812, 4417, 0.5, 2107755527, 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`=26153754 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26153754 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','autre_refus','Carton_gris','environnement','plastique','flou','Carton_brun','papier','Teint_Dans_La_Masse','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 26153754, 'sub_port_id': 26153801, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617699, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'cartonnette': {'main_port_id': 26153754, 'sub_port_id': 26153802, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617700, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'metal': {'main_port_id': 26153754, 'sub_port_id': 26153803, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617701, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'autre_refus': {'main_port_id': 26153754, 'sub_port_id': 26153804, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617702, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'Carton_gris': {'main_port_id': 26153754, 'sub_port_id': 26153805, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617703, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'environnement': {'main_port_id': 26153754, 'sub_port_id': 26153806, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617704, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'plastique': {'main_port_id': 26153754, 'sub_port_id': 26153807, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617705, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'flou': {'main_port_id': 26153754, 'sub_port_id': 26153808, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617706, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'Carton_brun': {'main_port_id': 26153754, 'sub_port_id': 26153809, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617707, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'papier': {'main_port_id': 26153754, 'sub_port_id': 26153810, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617708, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'Teint_Dans_La_Masse': {'main_port_id': 26153754, 'sub_port_id': 26153811, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617709, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}, 'mal_croppe': {'main_port_id': 26153754, 'sub_port_id': 26153812, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17617710, 'last_updated_at': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 16, 3, 36), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 16, 3, 36)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153801,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153786 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153802,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153787 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153803,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153788 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153804,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153789 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153805,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153790 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153806,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153791 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153807,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153792 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153808,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153793 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153809,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153794 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153810,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153795 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153811,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153796 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26153812,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26153797 lien utilise dans velours : https://www.fotonower.com/velours/26153801,26153802,26153803,26153804,26153805,26153806,26153807,26153808,26153809,26153810,26153811,26153812?tags=kraft,cartonnette,metal,autre_refus,Carton_gris,environnement,plastique,flou,Carton_brun,papier,Teint_Dans_La_Masse,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26153754]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] map_info['map_portfolio_photo'] : {26153754: [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449]} final : False mtd_id 4302 list_pids : [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] Looping around the photos to save general results len do output : 1 /26153754. 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, '3575401') ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26153754', "{'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797}", None, None, None, None, '3575401'), ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401')] time used for this insertion : 0.037110090255737305 save_final save missing photos in datou_result : time spend for datou_step_exec : 7.208943605422974 time spend to save output : 0.03738546371459961 total time spend for step 1 : 7.246329069137573 step2:final Fri Aug 22 16:03:37 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 (26153754) 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 26153754 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1378609452,1378609451,1378609450,1378609449,1378609495,1378609494,1378609493,1378609492,1378609491,1378609490); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26153754]) Inside saveOutput : final : False verbose : True original output for save of step final : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} new output for save of step final : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] map_info['map_portfolio_photo'] : {26153754: [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449]} final : False mtd_id 4302 list_pids : [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] Looping around the photos to save general results len do output : 10 /1378609495.Didn't retrieve data . /1378609494.Didn't retrieve data . /1378609493.Didn't retrieve data . /1378609492.Didn't retrieve data . /1378609491.Didn't retrieve data . /1378609490.Didn't retrieve data . /1378609452.Didn't retrieve data . /1378609451.Didn't retrieve data . /1378609450.Didn't retrieve data . /1378609449.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, '3575401') ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26153754', '1378609495', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609494', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609493', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609492', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609491', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609490', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609452', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609451', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609450', '0.0', None, None, None, None, '3575401'), ('4302', '26153754', '1378609449', '0.0', None, None, None, None, '3575401')] time used for this insertion : 0.029870986938476562 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013393640518188477 time spend to save output : 0.03035593032836914 total time spend for step 2 : 0.04374957084655762 step3:velours_tree Fri Aug 22 16:03:37 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 : {26153754: [{'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797}]} input_args_next_step : {26153754: ()} output_args : {26153754: [{'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797}]} args : 26153754 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 : ({'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26153754) 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([26153754]) 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.307647705078125 time spend to save output : 5.2928924560546875e-05 total time spend for step 3 : 0.30770063400268555 step4:send_mail_cod Fri Aug 22 16:03:37 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 : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} input_args_next_step : {1378609495: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609495 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609494 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609493 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609492 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609491 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609490 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609452 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609451 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609450 depend.output_id : 0 input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ()} output_args : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',)} args : 1378609449 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 : {26153754: [{'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797}]} input_args_next_step : {1378609495: ('0.0',), 1378609494: ('0.0',), 1378609493: ('0.0',), 1378609492: ('0.0',), 1378609491: ('0.0',), 1378609490: ('0.0',), 1378609452: ('0.0',), 1378609451: ('0.0',), 1378609450: ('0.0',), 1378609449: ('0.0',), 26153754: ()} output_args : {26153754: [{'kraft': 26153786, 'cartonnette': 26153787, 'metal': 26153788, 'autre_refus': 26153789, 'Carton_gris': 26153790, 'environnement': 26153791, 'plastique': 26153792, 'flou': 26153793, 'Carton_brun': 26153794, 'papier': 26153795, 'Teint_Dans_La_Masse': 26153796, 'mal_croppe': 26153797}]} args : 26153754 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26153754) 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 (1378609495,1378609494,1378609493,1378609492,1378609491,1378609490,1378609452,1378609451,1378609450,1378609449) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1378609449 begin to download photo : 1378609452 begin to download photo : 1378609492 begin to download photo : 1378609495 download finish for photo 1378609452 begin to download photo : 1378609490 download finish for photo 1378609495 download finish for photo 1378609492 begin to download photo : 1378609493 download finish for photo 1378609449 begin to download photo : 1378609450 download finish for photo 1378609490 begin to download photo : 1378609491 download finish for photo 1378609450 begin to download photo : 1378609451 download finish for photo 1378609493 begin to download photo : 1378609494 download finish for photo 1378609491 download finish for photo 1378609451 download finish for photo 1378609494 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette261537861755871418/ imagette261537871755871418/ imagette261537881755871418/ imagette261537891755871418/ imagette261537921755871418/ imagette261537931755871418/ imagette261537971755871418/ imagette261537901755871418/ imagette261537941755871418/ imagette261537961755871418/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P26153754_22-08-2025_16_03_38.pdf 26153786 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=26153786 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537861755871418 26153787 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=26153787 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537871755871418 26153788 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=26153788 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537881755871418 26153789 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=26153789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537891755871418 26153792 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=26153792 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537921755871418 26153793 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=26153793 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537931755871418 26153797 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=26153797 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537971755871418 26153790 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=26153790 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537901755871418 26153794 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=26153794 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537941755871418 26153796 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=26153796 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261537961755871418 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26153754 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/26153801,26153802,26153803,26153804,26153805,26153806,26153807,26153808,26153809,26153810,26153811,26153812?tags=kraft,cartonnette,metal,autre_refus,Carton_gris,environnement,plastique,flou,Carton_brun,papier,Teint_Dans_La_Masse,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1378609495] : ('0.0',) no score found for photo 1378609495 We are sending mail with results at report@fotonower.com args[1378609494] : ('0.0',) no score found for photo 1378609494 We are sending mail with results at report@fotonower.com args[1378609493] : ('0.0',) no score found for photo 1378609493 We are sending mail with results at report@fotonower.com args[1378609492] : ('0.0',) no score found for photo 1378609492 We are sending mail with results at report@fotonower.com args[1378609491] : ('0.0',) no score found for photo 1378609491 We are sending mail with results at report@fotonower.com args[1378609490] : ('0.0',) no score found for photo 1378609490 We are sending mail with results at report@fotonower.com args[1378609452] : ('0.0',) no score found for photo 1378609452 We are sending mail with results at report@fotonower.com args[1378609451] : ('0.0',) no score found for photo 1378609451 We are sending mail with results at report@fotonower.com args[1378609450] : ('0.0',) no score found for photo 1378609450 We are sending mail with results at report@fotonower.com args[1378609449] : ('0.0',) no score found for photo 1378609449 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=26153754 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_P26153754_22-08-2025_16_03_38.pdf results_Auto_P26153754_22-08-2025_16_03_38.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26153754_22-08-2025_16_03_38.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','26153754','results_Auto_P26153754_22-08-2025_16_03_38.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26153754_22-08-2025_16_03_38.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26153754]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] map_info['map_portfolio_photo'] : {26153754: [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449]} final : False mtd_id 4302 list_pids : [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] 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, '3575401') ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26153754', '1378609495', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401')] time used for this insertion : 0.0335845947265625 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.839672565460205 time spend to save output : 0.033826589584350586 total time spend for step 4 : 1.8734991550445557 step5:split_time_score Fri Aug 22 16:03:39 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 : ['26153754'] 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 : [('26153754',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26153754) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1378609495: {'path': 'temp/1755871417_4044277_1378609495_dafc5c956e0a9c61940a329c05532d71_41006473.jpg', 'extension': 'jpg'}, 1378609452: {'path': 'temp/1755871417_4044277_1378609452_1390bc7c3696faf6ecb0b586c7b2769d_41455468.jpg', 'extension': 'jpg'}, 1378609490: {'path': 'temp/1755871417_4044277_1378609490_b457df0ed24747bcd4e611392688b88d_82675341.jpg', 'extension': 'jpg'}, 1378609491: {'path': 'temp/1755871417_4044277_1378609491_665836838e9ab02d9ed4d958efc55530_67475052.jpg', 'extension': 'jpg'}, 1378609449: {'path': 'temp/1755871417_4044277_1378609449_1561a616529bc19b0bebaecf87d7e1a4_66159839.jpg', 'extension': 'jpg'}, 1378609450: {'path': 'temp/1755871417_4044277_1378609450_3a555c5ce75d2cbee7b5a6b1538ce68a_64220323.jpg', 'extension': 'jpg'}, 1378609451: {'path': 'temp/1755871417_4044277_1378609451_02a0d58b97ba8a86f0cd7c7db969fe62_61266520.jpg', 'extension': 'jpg'}, 1378609492: {'path': 'temp/1755871417_4044277_1378609492_dd9f4c0d7d59c2820f9b03482834798d_83158400.jpg', 'extension': 'jpg'}, 1378609493: {'path': 'temp/1755871417_4044277_1378609493_1b67d7b8dbcdeb867056d25577f52016_89201874.jpg', 'extension': 'jpg'}, 1378609494: {'path': 'temp/1755871417_4044277_1378609494_9c9576be8193033662aa8713ab6a09ce_13639898.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 = 26153754; (('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 = 26153754 group by h (('16', 10),) 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=26153754 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 (26153754) 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 (26153754) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 22082025 26153754 Nombre de photos uploadées : 10 / 23040 (0%) 22082025 26153754 Nombre de photos taguées (types de déchets): 0 / 10 (0%) 22082025 26153754 Nombre de photos taguées (volume) : 0 / 10 (0%) [{'photo_id': 1378609452, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1390bc7c3696faf6ecb0b586c7b2769d_41455468.jpg', 'username': None, 'uploaded_at': 1755871272, 'text': 'image_22082025_16_00_14_10211.jpg'}, {'photo_id': 1378609451, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/02a0d58b97ba8a86f0cd7c7db969fe62_61266520.jpg', 'username': None, 'uploaded_at': 1755871272, 'text': 'image_22082025_16_00_24_10137.jpg'}, {'photo_id': 1378609450, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/3a555c5ce75d2cbee7b5a6b1538ce68a_64220323.jpg', 'username': None, 'uploaded_at': 1755871272, 'text': 'image_22082025_16_00_34_10143.jpg'}, {'photo_id': 1378609449, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1561a616529bc19b0bebaecf87d7e1a4_66159839.jpg', 'username': None, 'uploaded_at': 1755871272, 'text': 'image_22082025_16_00_44_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005259513854980469 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 26153754, '2025-08-22' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2154787,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.5303347110748291 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= 2154787 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2154787, 'dashboard_run_id': 2167763, 'mtr_portfolio_id': 26152261, 'dashboard_result_id': 14193186, '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_P26152261_22-08-2025_15_33_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26152310, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26152311, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26152312, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26152313, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26152314, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26152316, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26152317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26152318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26152319, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26152320, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26152321, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26152322, 'pht': 3726}}"}, {'dashboat_entry_day': 2154787, 'dashboard_run_id': 2167763, 'mtr_portfolio_id': 26152719, 'dashboard_result_id': 14193187, '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_P26152719_22-08-2025_15_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26152748, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26152749, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26152750, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26152752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26152754, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26152755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26152756, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26152757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26152758, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26152759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26152760, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26152761, 'pht': 3726}}"}, {'dashboat_entry_day': 2154787, 'dashboard_run_id': 2167763, 'mtr_portfolio_id': 26153238, 'dashboard_result_id': 14193188, '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_P26153238_22-08-2025_16_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26153252, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26153253, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26153254, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26153255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26153256, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26153257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26153258, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26153259, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26153260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26153261, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26153262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26153264, 'pht': 3726}}"}, {'dashboat_entry_day': 2154787, 'dashboard_run_id': 2167763, 'mtr_portfolio_id': 26153754, 'dashboard_result_id': 14193189, '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 = 26152261 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 = 26152261 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 = 26152261 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26152261 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 = 26152261 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 = 26152261 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26152261_22-08-2025_15_33_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26152261 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_P26152261_22-08-2025_15_33_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26152310, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26152311, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26152312, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26152313, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26152314, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26152316, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26152317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26152318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26152319, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26152320, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26152321, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26152322, 'pht': 3726}}" where mtr_portfolio_id = 26152261 and dashboard_run_id = 2167763 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 = 26152719 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 = 26152719 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 = 26152719 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26152719 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 = 26152719 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 = 26152719 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26152719_22-08-2025_15_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26152719 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_P26152719_22-08-2025_15_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26152748, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26152749, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26152750, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26152752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26152754, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26152755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26152756, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26152757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26152758, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26152759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26152760, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26152761, 'pht': 3726}}" where mtr_portfolio_id = 26152719 and dashboard_run_id = 2167763 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 = 26153238 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 = 26153238 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 = 26153238 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26153238 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 = 26153238 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 = 26153238 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26153238_22-08-2025_16_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26153238 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_P26153238_22-08-2025_16_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26153252, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26153253, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26153254, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26153255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26153256, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26153257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26153258, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26153259, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26153260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26153261, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26153262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26153264, 'pht': 3726}}" where mtr_portfolio_id = 26153238 and dashboard_run_id = 2167763 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 = 26153754 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 = 26153754 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 = 26153754 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26153754 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 = 26153754 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 = 26153754 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26153754_22-08-2025_16_03_38.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26153754 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_P26153754_22-08-2025_16_03_38.pdf'}" where mtr_portfolio_id = 26153754 and dashboard_run_id = 2167763 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26152261,26152719,26153238,26153754) result : ((1378590817,), (1378590819,), (1378590821,), (1378590824,), (1378590827,), (1378591288,), (1378591292,), (1378591296,), (1378591300,), (1378591304,), (1378591880,), (1378591883,), (1378591887,), (1378591890,), (1378591892,), (1378591895,), (1378591973,), (1378591976,), (1378591979,), (1378592253,), (1378592255,), (1378592257,), (1378592259,), (1378592608,), (1378592611,), (1378592614,), (1378592617,), (1378592620,), (1378592888,), (1378592889,), (1378592890,), (1378593250,), (1378593253,), (1378593256,), (1378593688,), (1378593691,), (1378593693,), (1378593695,), (1378593697,), (1378593699,), (1378594095,), (1378594099,), (1378594102,), (1378594106,), (1378594110,), (1378594114,), (1378594813,), (1378594817,), (1378594820,), (1378594823,), (1378595346,), (1378595349,), (1378595352,), (1378595355,), (1378595697,), (1378595699,), (1378595701,), (1378595703,), (1378595705,), (1378595707,), (1378596367,), (1378596370,), (1378596373,), (1378596377,), (1378596380,), (1378596383,), (1378596446,), (1378596449,), (1378596453,), (1378596870,), (1378597516,), (1378597519,), (1378597522,), (1378598150,), (1378598144,), (1378598147,), (1378598644,), (1378598646,), (1378598648,), (1378598650,), (1378598652,), (1378599109,), (1378599113,), (1378599118,), (1378599123,), (1378599833,), (1378599836,), (1378599839,), (1378599842,), (1378599845,), (1378600368,), (1378600370,), (1378600372,), (1378600374,), (1378600376,), (1378600802,), (1378601373,), (1378601376,), (1378602106,), (1378602109,), (1378602111,), (1378602113,), (1378602600,), (1378602603,), (1378602606,), (1378602609,), (1378602612,), (1378603101,), (1378603104,), (1378603107,), (1378603110,), (1378603113,), (1378603601,), (1378603604,), (1378604004,), (1378604007,), (1378604010,), (1378604471,), (1378604473,), (1378604475,), (1378604477,), (1378604479,), (1378604907,), (1378604909,), (1378604911,), (1378604913,), (1378605249,), (1378605250,), (1378605251,), (1378605252,), (1378605503,), (1378605497,), (1378605500,), (1378605708,), (1378605709,), (1378605710,), (1378605711,), (1378605712,), (1378605714,), (1378605937,), (1378605938,), (1378605939,), (1378605940,), (1378606019,), (1378606022,), (1378606025,), (1378606028,), (1378606418,), (1378606420,), (1378606423,), (1378606425,), (1378606756,), (1378606759,), (1378606762,), (1378606765,), (1378606978,), (1378606981,), (1378606984,), (1378607427,), (1378607429,), (1378607431,), (1378607433,), (1378607435,), (1378607602,), (1378607603,), (1378607604,), (1378607919,), (1378607923,), (1378608260,), (1378608261,), (1378608586,), (1378608588,), (1378608590,), (1378608592,), (1378608912,), (1378608915,), (1378608918,), (1378609398,), (1378609400,), (1378609402,), (1378609404,), (1378609405,), (1378609408,), (1378609453,), (1378609449,), (1378609450,), (1378609451,), (1378609452,), (1378609490,), (1378609491,), (1378609492,), (1378609493,), (1378609494,), (1378609495,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'22082025': {'nb_upload': 10, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26153754]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] map_info['map_portfolio_photo'] : {26153754: [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449]} final : True mtd_id 4302 list_pids : [1378609495, 1378609494, 1378609493, 1378609492, 1378609491, 1378609490, 1378609452, 1378609451, 1378609450, 1378609449] Looping around the photos to save general results len do output : 1 /26153754Didn'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, '3575401') ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401') ('4302', None, None, None, None, None, None, None, '3575401') ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26153754', 'None', None, None, None, None, '3575401'), ('4302', '26153754', '1378609495', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609494', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609493', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609492', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609491', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609490', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609452', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609451', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609450', None, None, None, None, None, '3575401'), ('4302', '26153754', '1378609449', None, None, None, None, None, '3575401')] time used for this insertion : 0.03641986846923828 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1869337558746338 time spend to save output : 0.03670787811279297 total time spend for step 5 : 1.2236416339874268 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 (3575401) 1.99user 1.97system 0:15.19elapsed 26%CPU (0avgtext+0avgdata 160664maxresident)k 752inputs+5856outputs (10major+64202minor)pagefaults 0swaps