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 : 3911276 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 (2717994) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2717994) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991914 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2717994'] with mtr_portfolio_ids : ['21991914'] and first list_photo_ids : [] new path : /proc/3911276/ Name: python3 Umask: 0002 State: R (running) Tgid: 3911276 Ngid: 0 Pid: 3911276 PPid: 3911275 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3911276 NSpid: 3911276 NSpgid: 3906629 NSsid: 3906629 VmPeak: 1106936 kB VmSize: 1106936 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98428 kB VmRSS: 98428 kB RssAnon: 59776 kB RssFile: 38652 kB RssShmem: 0 kB VmData: 865684 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 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: 56 nonvoluntary_ctxt_switches: 91 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3911276', 'Ngid': '0', 'Pid': '3911276', 'PPid': '3911275', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3911276', 'NSpid': '3911276', 'NSpgid': '3906629', 'NSsid': '3906629', 'VmPeak': '1106936 kB', 'VmSize': '1106936 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98428 kB', 'VmRSS': '98428 kB', 'RssAnon': '59776 kB', 'RssFile': '38652 kB', 'RssShmem': '0 kB', 'VmData': '865684 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', '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': '56', 'nonvoluntary_ctxt_switches': '91'} ('datou_batch_current', '3911276', '1106936', '0', '1106936', '865684', '98428', b'', 'marlene', '2717994') 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 (21991914) 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 (2717994 ) ) 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 (21991914) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349627394, 'portfolio_id': 21991914}, {'photo_id': 1349626931, 'portfolio_id': 21991914}, {'photo_id': 1349626910, 'portfolio_id': 21991914}, {'photo_id': 1349626895, 'portfolio_id': 21991914}, {'photo_id': 1349626804, 'portfolio_id': 21991914}, {'photo_id': 1349626620, 'portfolio_id': 21991914}, {'photo_id': 1349626603, 'portfolio_id': 21991914}, {'photo_id': 1349626571, 'portfolio_id': 21991914}, {'photo_id': 1349626547, 'portfolio_id': 21991914}, {'photo_id': 1349626522, 'portfolio_id': 21991914}, {'photo_id': 1349626484, 'portfolio_id': 21991914}, {'photo_id': 1349626208, 'portfolio_id': 21991914}, {'photo_id': 1349626183, 'portfolio_id': 21991914}, {'photo_id': 1349626179, 'portfolio_id': 21991914}, {'photo_id': 1349626158, 'portfolio_id': 21991914}, {'photo_id': 1349626133, 'portfolio_id': 21991914}, {'photo_id': 1349626076, 'portfolio_id': 21991914}, {'photo_id': 1349625787, 'portfolio_id': 21991914}, {'photo_id': 1349625783, 'portfolio_id': 21991914}, {'photo_id': 1349625779, 'portfolio_id': 21991914}, {'photo_id': 1349625775, 'portfolio_id': 21991914}, {'photo_id': 1349625764, 'portfolio_id': 21991914}, {'photo_id': 1349625525, 'portfolio_id': 21991914}, {'photo_id': 1349625521, 'portfolio_id': 21991914}, {'photo_id': 1349625297, 'portfolio_id': 21991914}, {'photo_id': 1349625271, 'portfolio_id': 21991914}, {'photo_id': 1349625262, 'portfolio_id': 21991914}, {'photo_id': 1349625256, 'portfolio_id': 21991914}, {'photo_id': 1349625144, 'portfolio_id': 21991914}, {'photo_id': 1349625125, 'portfolio_id': 21991914}, {'photo_id': 1349625117, 'portfolio_id': 21991914}, {'photo_id': 1349625108, 'portfolio_id': 21991914}, {'photo_id': 1349625097, 'portfolio_id': 21991914}, {'photo_id': 1349625084, 'portfolio_id': 21991914}, {'photo_id': 1349625032, 'portfolio_id': 21991914}, {'photo_id': 1349625029, 'portfolio_id': 21991914}, {'photo_id': 1349625025, 'portfolio_id': 21991914}, {'photo_id': 1349624963, 'portfolio_id': 21991914}, {'photo_id': 1349624947, 'portfolio_id': 21991914}, {'photo_id': 1349624941, 'portfolio_id': 21991914}, {'photo_id': 1349624925, 'portfolio_id': 21991914}, {'photo_id': 1349624905, 'portfolio_id': 21991914}, {'photo_id': 1349624779, 'portfolio_id': 21991914}, {'photo_id': 1349624776, 'portfolio_id': 21991914}, {'photo_id': 1349624772, 'portfolio_id': 21991914}, {'photo_id': 1349624750, 'portfolio_id': 21991914}, {'photo_id': 1349624722, 'portfolio_id': 21991914}, {'photo_id': 1349624697, 'portfolio_id': 21991914}, {'photo_id': 1349624387, 'portfolio_id': 21991914}, {'photo_id': 1349624355, 'portfolio_id': 21991914}, {'photo_id': 1349624317, 'portfolio_id': 21991914}, {'photo_id': 1349624273, 'portfolio_id': 21991914}, {'photo_id': 1349623977, 'portfolio_id': 21991914}, {'photo_id': 1349623964, 'portfolio_id': 21991914}] map_portfolio_id_photo_id: {21991914: [1349627394, 1349626931, 1349626910, 1349626895, 1349626804, 1349626620, 1349626603, 1349626571, 1349626547, 1349626522, 1349626484, 1349626208, 1349626183, 1349626179, 1349626158, 1349626133, 1349626076, 1349625787, 1349625783, 1349625779, 1349625775, 1349625764, 1349625525, 1349625521, 1349625297, 1349625271, 1349625262, 1349625256, 1349625144, 1349625125, 1349625117, 1349625108, 1349625097, 1349625084, 1349625032, 1349625029, 1349625025, 1349624963, 1349624947, 1349624941, 1349624925, 1349624905, 1349624779, 1349624776, 1349624772, 1349624750, 1349624722, 1349624697, 1349624387, 1349624355, 1349624317, 1349624273, 1349623977, 1349623964]} ##### 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.01475214958190918 #### 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 Wed Apr 2 22:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21991914) 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 : 21991914 get user id for portfolio 21991914 get sub ptf for main ptf 21991914, type 3726 and hashtags ['metal', 'Carton_gris', 'cartonnette', 'autre_refus', 'Carton_brun', 'plastique', 'environnement', 'flou', 'mal_croppe', 'papier', 'kraft', 'Teint_Dans_La_Masse'] 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`=21991914 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','cartonnette','autre_refus','Carton_brun','plastique','environnement','flou','mal_croppe','papier','kraft','Teint_Dans_La_Masse')) 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`=21991914 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','cartonnette','autre_refus','Carton_brun','plastique','environnement','flou','mal_croppe','papier','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 21991914, 'sub_port_id': 21991916, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488809, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'mal_croppe': {'main_port_id': 21991914, 'sub_port_id': 21991917, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488810, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'Carton_gris': {'main_port_id': 21991914, 'sub_port_id': 21991918, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488811, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'cartonnette': {'main_port_id': 21991914, 'sub_port_id': 21991919, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488812, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'kraft': {'main_port_id': 21991914, 'sub_port_id': 21991920, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488813, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'Carton_brun': {'main_port_id': 21991914, 'sub_port_id': 21991921, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488814, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'flou': {'main_port_id': 21991914, 'sub_port_id': 21991922, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488815, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'environnement': {'main_port_id': 21991914, 'sub_port_id': 21991923, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488816, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'papier': {'main_port_id': 21991914, 'sub_port_id': 21991924, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488817, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 21991914, 'sub_port_id': 21991925, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488818, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'plastique': {'main_port_id': 21991914, 'sub_port_id': 21991926, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488819, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}, 'autre_refus': {'main_port_id': 21991914, 'sub_port_id': 21991927, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488820, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 36, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21991916 , 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=21991914 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 (21991916) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991917 , 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=21991914 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 (21991917) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991918 , 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=21991914 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 (21991918) result : ((1349624798,), (1349625060,), (1349625061,), (1349625748,), (1349625749,), (1349625767,), (1349625768,), (1349625769,), (1349628988,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991919 , 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=21991914 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 (21991919) result : ((1349624873,), (1349625065,), (1349625066,), (1349625067,), (1349625449,), (1349625577,), (1349628997,), (1349628998,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991920 , 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=21991914 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 (21991920) result : ((1349625774,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991921 , 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=21991914 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 (21991921) result : ((1349625069,), (1349625070,), (1349625585,), (1349625750,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991922 , 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=21991914 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 (21991922) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991923 , 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=21991914 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 (21991923) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991924 , 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=21991914 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 (21991924) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991925 , 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=21991914 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 (21991925) result : ((1349624793,), (1349624794,), (1349624795,), (1349624796,), (1349624797,), (1349624869,), (1349625333,), (1349625550,), (1349625742,), (1349625765,), (1349627098,), (1349628954,), (1349628955,), (1349628957,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991926 , 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=21991914 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 (21991926) result : ((1349624799,), (1349625339,), (1349625593,), (1349625594,), (1349625751,), (1349625752,), (1349625753,), (1349625770,), (1349625771,), (1349629014,), (1349629016,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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 21991927 , 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=21991914 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 (21991927) result : ((1349625058,), (1349625334,), (1349625336,), (1349625568,), (1349625744,), (1349625745,), (1349627104,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21991914) result : ((1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,)) 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`=21991914 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','cartonnette','autre_refus','Carton_brun','plastique','environnement','flou','mal_croppe','papier','kraft','Teint_Dans_La_Masse')) 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`=21991914 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','cartonnette','autre_refus','Carton_brun','plastique','environnement','flou','mal_croppe','papier','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 21991914, 'sub_port_id': 21991928, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488821, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'mal_croppe': {'main_port_id': 21991914, 'sub_port_id': 21991929, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488822, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'Carton_gris': {'main_port_id': 21991914, 'sub_port_id': 21991930, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488823, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'cartonnette': {'main_port_id': 21991914, 'sub_port_id': 21991931, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488824, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'kraft': {'main_port_id': 21991914, 'sub_port_id': 21991932, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488825, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'Carton_brun': {'main_port_id': 21991914, 'sub_port_id': 21991933, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488826, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'flou': {'main_port_id': 21991914, 'sub_port_id': 21991934, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488827, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'environnement': {'main_port_id': 21991914, 'sub_port_id': 21991935, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488828, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'papier': {'main_port_id': 21991914, 'sub_port_id': 21991936, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488829, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'Teint_Dans_La_Masse': {'main_port_id': 21991914, 'sub_port_id': 21991937, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488830, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'plastique': {'main_port_id': 21991914, 'sub_port_id': 21991938, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488831, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 37), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}, 'autre_refus': {'main_port_id': 21991914, 'sub_port_id': 21991939, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14488832, 'last_updated_at': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 2, 22, 46, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 2, 22, 37)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991928,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991916 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991929,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991917 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991930,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991918 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991931,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991919 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991932,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991920 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991933,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991921 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991934,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991922 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991935,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991923 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991936,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991924 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991937,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991925 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991938,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991926 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21991939,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21991927 lien utilise dans velours : https://www.fotonower.com/velours/21991928,21991929,21991930,21991931,21991932,21991933,21991934,21991935,21991936,21991937,21991938,21991939?tags=metal,mal_croppe,Carton_gris,cartonnette,kraft,Carton_brun,flou,environnement,papier,Teint_Dans_La_Masse,plastique,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21991914]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349627394] map_info['map_portfolio_photo'] : {21991914: [1349627394, 1349626931, 1349626910, 1349626895, 1349626804, 1349626620, 1349626603, 1349626571, 1349626547, 1349626522, 1349626484, 1349626208, 1349626183, 1349626179, 1349626158, 1349626133, 1349626076, 1349625787, 1349625783, 1349625779, 1349625775, 1349625764, 1349625525, 1349625521, 1349625297, 1349625271, 1349625262, 1349625256, 1349625144, 1349625125, 1349625117, 1349625108, 1349625097, 1349625084, 1349625032, 1349625029, 1349625025, 1349624963, 1349624947, 1349624941, 1349624925, 1349624905, 1349624779, 1349624776, 1349624772, 1349624750, 1349624722, 1349624697, 1349624387, 1349624355, 1349624317, 1349624273, 1349623977, 1349623964]} final : False mtd_id 4302 list_pids : [1349627394] Looping around the photos to save general results len do output : 1 /21991914. 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, '2717994') ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '21991914', "{'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927}", None, None, None, None, '2717994'), ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994')] time used for this insertion : 0.018471717834472656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.54752516746521 time spend to save output : 0.018718957901000977 total time spend for step 1 : 1.566244125366211 step2:final Wed Apr 2 22:48:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21991914) 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 21991914 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349623977,1349623964,1349624387,1349624355,1349624317,1349624273,1349624779,1349624776,1349624772,1349624750,1349624722,1349624697,1349624963,1349624947,1349624941,1349624925,1349624905,1349625032,1349625029,1349625025,1349625144,1349625125,1349625117,1349625108,1349625097,1349625084,1349625297,1349625271,1349625262,1349625256,1349625525,1349625521,1349625787,1349625783,1349625779,1349625775,1349625764,1349626208,1349626183,1349626179,1349626158,1349626133,1349626076,1349626620,1349626603,1349626571,1349626547,1349626522,1349626484,1349626931,1349626804,1349626910,1349626895,1349627394); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21991914]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349627394: ('0.04052662425498596',)} new output for save of step final : {1349627394: ('0.04052662425498596',)} [1349627394] map_info['map_portfolio_photo'] : {21991914: [1349627394, 1349626931, 1349626910, 1349626895, 1349626804, 1349626620, 1349626603, 1349626571, 1349626547, 1349626522, 1349626484, 1349626208, 1349626183, 1349626179, 1349626158, 1349626133, 1349626076, 1349625787, 1349625783, 1349625779, 1349625775, 1349625764, 1349625525, 1349625521, 1349625297, 1349625271, 1349625262, 1349625256, 1349625144, 1349625125, 1349625117, 1349625108, 1349625097, 1349625084, 1349625032, 1349625029, 1349625025, 1349624963, 1349624947, 1349624941, 1349624925, 1349624905, 1349624779, 1349624776, 1349624772, 1349624750, 1349624722, 1349624697, 1349624387, 1349624355, 1349624317, 1349624273, 1349623977, 1349623964]} final : False mtd_id 4302 list_pids : [1349627394] Looping around the photos to save general results len do output : 1 /1349627394.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, '2717994') ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '21991914', '1349627394', '0.04052662425498596', None, None, None, None, '2717994')] time used for this insertion : 0.01997208595275879 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07304930686950684 time spend to save output : 0.020175457000732422 total time spend for step 2 : 0.09322476387023926 step3:velours_tree Wed Apr 2 22:48:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21991914: [{'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927}]} input_args_next_step : {21991914: ()} output_args : {21991914: [{'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927}]} args : 21991914 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 : ({'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21991914) 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([21991914]) 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.29983043670654297 time spend to save output : 0.0001068115234375 total time spend for step 3 : 0.29993724822998047 step4:send_mail_cod Wed Apr 2 22:48:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1349627394: ('0.04052662425498596',)} input_args_next_step : {1349627394: ()} output_args : {1349627394: ('0.04052662425498596',)} args : 1349627394 depend.output_id : 0 complete output_args for input 3 : {21991914: [{'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927}]} input_args_next_step : {1349627394: ('0.04052662425498596',), 21991914: ()} output_args : {21991914: [{'metal': 21991916, 'mal_croppe': 21991917, 'Carton_gris': 21991918, 'cartonnette': 21991919, 'kraft': 21991920, 'Carton_brun': 21991921, 'flou': 21991922, 'environnement': 21991923, 'papier': 21991924, 'Teint_Dans_La_Masse': 21991925, 'plastique': 21991926, 'autre_refus': 21991927}]} args : 21991914 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 :2, first value : ('0.04052662425498596',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21991914) 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 (1349627394) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349627394 download finish for photo 1349627394 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette219919161743626939/ imagette219919171743626939/ length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P21991914_02-04-2025_22_48_59.pdf 21991916 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=21991916 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219919161743626939 21991917 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=21991917 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219919171743626939 21991919 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=21991919 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349624873: '1743626131_1514050_1349624355_363fc6578eaa58c26220eb9269a43496_rle_crop_3744945684_0.png', 1349625065: '1743626231_1514982_1349624750_8829679a37b446a30fa75c73f40b6687_rle_crop_3744952037_0.png', 1349625066: '1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958264_0.png', 1349625067: '1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958265_0.png', 1349625449: '1743626372_1516032_1349624963_4ccf00ab2841be219c0c44fe0c03271e_rle_crop_3744976164_0.png', 1349625577: '1743626392_1516278_1349624905_eed1beb4287b742dda4a8a29a4f18aef_rle_crop_3744978702_0.png', 1349628997: '1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042100_0.png', 1349628998: '1743626854_1521446_1349626547_bcae04546deffeac023c5405debcde7a_rle_crop_3745042134_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/0379a19732638bcfb3cb50c655e5b39c_17387344.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/daa0b04e211d0b6485bbd861ce7d3b3f_24040186.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/b98262a19aad346f7b25222dc3e2d25f_58188688.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/95863ff0d5377ac15b0beb9800849d7c_95875799.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/7e83a68a54d1699f1d2a5f457a8f3855_83120673.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/797b73b57682312f3cfbe5983704af3b_36918502.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/6a68e2b27759a9fdcc362d2b6e9ba86b_82528776.png change filename to text .imagette219919191743626939/ imagette219919191743626939/1743626854_1521446_1349626547_bcae04546deffeac023c5405debcde7a_rle_crop_3745042134_0.png.png imagette219919191743626939/1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958264_0.png.png imagette219919191743626939/1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042100_0.png.png imagette219919191743626939/1743626131_1514050_1349624355_363fc6578eaa58c26220eb9269a43496_rle_crop_3744945684_0.png.png imagette219919191743626939/1743626231_1514982_1349624750_8829679a37b446a30fa75c73f40b6687_rle_crop_3744952037_0.png.png imagette219919191743626939/1743626372_1516032_1349624963_4ccf00ab2841be219c0c44fe0c03271e_rle_crop_3744976164_0.png.png imagette219919191743626939/1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958265_0.png.png imagette219919191743626939/1743626392_1516278_1349624905_eed1beb4287b742dda4a8a29a4f18aef_rle_crop_3744978702_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/644471c748e8faa218284c9a6e9c6777_64554274.png imagette219919191743626939 21991920 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=21991920 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349625774: '1743626472_1517511_1349625097_d30771466252755d293a6f6a590b1ef2_rle_crop_3744991629_0.png'} change filename to text .imagette219919201743626940/ imagette219919201743626940/1743626472_1517511_1349625097_d30771466252755d293a6f6a590b1ef2_rle_crop_3744991629_0.png.png imagette219919221743626940/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/03df681169751c52046bfe4f7b911123_1449021.png imagette219919201743626940 21991922 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=21991922 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219919221743626940 21991926 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=21991926 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349624799: '1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945550_0.png', 1349625339: '1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976063_0.png', 1349625593: '1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978645_0.png', 1349625594: '1743626392_1516278_1349624905_eed1beb4287b742dda4a8a29a4f18aef_rle_crop_3744978704_0.png', 1349625751: '1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987933_0.png', 1349625752: '1743626462_1517322_1349625262_1d6017c6f5539b81cb165ada0da70c9f_rle_crop_3744987950_0.png', 1349625753: '1743626462_1517322_1349625256_16953c27429b548144ccb4077371b8f0_rle_crop_3744987962_0.png', 1349625770: '1743626472_1517511_1349625125_a0ed921dec0d5247ea95aa7cca0515f3_rle_crop_3744991601_0.png', 1349625771: '1743626472_1517511_1349625117_c7259fbf7fadc4b1bcc80bd6d99e44b1_rle_crop_3744991609_0.png', 1349629014: '1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042096_0.png', 1349629016: '1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042118_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/e0d80b8cb2b6d62dd4b7ff3c6f7a1d85_10412418.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/7d19e1395df191bd37843706df6d2446_43759319.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/4574402d60197c915a1fb9be32744a1f_24185658.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/38b96b0de22c580962cc0873a2d0773d_12891901.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/b5edfbbb8d5025fc96346ad1fe20dd97_58860529.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/f182813226f899a81b9f3b508ea874d9_19358697.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/98f3484afb056c6abefa7bf1dfec9eae_91090995.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/f213096f44210d1c03012b3cc9152a93_73118560.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/c63777926c5421c3e29ba8ef02476ba7_82577530.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/e12f814bbcd48ac8e07c99d4a4736e2b_37969720.png change filename to text .imagette219919261743626940/ imagette219919261743626940/1743626462_1517322_1349625256_16953c27429b548144ccb4077371b8f0_rle_crop_3744987962_0.png.png imagette219919261743626940/1743626462_1517322_1349625262_1d6017c6f5539b81cb165ada0da70c9f_rle_crop_3744987950_0.png.png imagette219919261743626940/1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978645_0.png.png imagette219919261743626940/1743626472_1517511_1349625125_a0ed921dec0d5247ea95aa7cca0515f3_rle_crop_3744991601_0.png.png imagette219919261743626940/1743626472_1517511_1349625117_c7259fbf7fadc4b1bcc80bd6d99e44b1_rle_crop_3744991609_0.png.png imagette219919261743626940/1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976063_0.png.png imagette219919261743626940/1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042118_0.png.png imagette219919261743626940/1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945550_0.png.png imagette219919261743626940/1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042096_0.png.png imagette219919261743626940/1743626392_1516278_1349624905_eed1beb4287b742dda4a8a29a4f18aef_rle_crop_3744978704_0.png.png imagette219919261743626940/1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987933_0.png.png wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/932c7d0bd21902f3e3ef91890393038a_5608472.png imagette219919261743626940 21991927 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=21991927 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349625058: '1743626231_1514982_1349624772_59039e7420ec8f0e77fa58785b8ef8f2_rle_crop_3744952015_0.png', 1349625334: '1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976060_0.png', 1349625336: '1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976059_0.png', 1349625568: '1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978635_0.png', 1349625744: '1743626462_1517322_1349625525_f68b92fac68d605bee87b2d8332e154a_rle_crop_3744987917_0.png', 1349625745: '1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987927_0.png', 1349627104: '1743626712_1519461_1349625521_8d0574019037bd5b3542626568ad7872_rle_crop_3745009817_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/355288b8281f38b0fd2a3267ef4f01f9_71015041.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/03487dda64b743555d70623ccd7dc7d7_79569130.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/c314b662e9f159e8388bf247d2cbe374_95574364.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/138b8e83f9367eb42848243667fce098_16923828.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/34f2dbb9bb47db484befc3161f9d4381_12460959.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/1563193df6e498d0b574f96d51c816d2_65074034.png change filename to text .imagette219919271743626941/ imagette219919271743626941/1743626462_1517322_1349625525_f68b92fac68d605bee87b2d8332e154a_rle_crop_3744987917_0.png.png imagette219919271743626941/1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978635_0.png.png imagette219919271743626941/1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976060_0.png.png imagette219919271743626941/1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976059_0.png.png imagette219919271743626941/1743626231_1514982_1349624772_59039e7420ec8f0e77fa58785b8ef8f2_rle_crop_3744952015_0.png.png imagette219919271743626941/1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987927_0.png.png imagette219919271743626941/1743626712_1519461_1349625521_8d0574019037bd5b3542626568ad7872_rle_crop_3745009817_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/2002dfceca8ac97d6bbefe5d16302df8_14411109.png imagette219919271743626941 21991918 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=21991918 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349624798: '1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945564_0.png', 1349625060: '1743626231_1514982_1349624750_8829679a37b446a30fa75c73f40b6687_rle_crop_3744952042_0.png', 1349625061: '1743626231_1514982_1349624697_dff893f8aa9d197bca2962bcb673036f_rle_crop_3744958610_0.png', 1349625748: '1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987935_0.png', 1349625749: '1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987929_0.png', 1349625767: '1743626472_1517511_1349625297_f94439d9eda5b0467b443b7d41af9c60_rle_crop_3744987989_0.png', 1349625768: '1743626472_1517511_1349625297_f94439d9eda5b0467b443b7d41af9c60_rle_crop_3744987985_0.png', 1349625769: '1743626472_1517511_1349625108_db5b01b5a2dc08c0cdbf4c3d1c2f236c_rle_crop_3744991616_0.png', 1349628988: '1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042114_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/8a5ce4b532d03171c2e79ab52ba14b6f_57784575.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/a51aa868cbb6bae0a515428e3ff33dc1_82265672.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/d8a9b20d5170e59f6158703306fc0fd6_45711513.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/35e69c17a021521d312a223f9f2a57b6_18159939.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/693de8fc2054b5cadc5e5930f8cc10ba_72914863.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/b6d1f309a1b97f0cc6c15f205006e534_97518467.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/006e0052b9f8907707cf66342976063e_40230140.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/21c8a3568ae4a49bda681c970c5b0c27_34759175.png change filename to text .imagette219919181743626941/ imagette219919181743626941/1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042114_0.png.png imagette219919181743626941/1743626472_1517511_1349625297_f94439d9eda5b0467b443b7d41af9c60_rle_crop_3744987985_0.png.png imagette219919181743626941/1743626472_1517511_1349625108_db5b01b5a2dc08c0cdbf4c3d1c2f236c_rle_crop_3744991616_0.png.png imagette219919181743626941/1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987929_0.png.png imagette219919181743626941/1743626231_1514982_1349624697_dff893f8aa9d197bca2962bcb673036f_rle_crop_3744958610_0.png.png imagette219919181743626941/1743626231_1514982_1349624750_8829679a37b446a30fa75c73f40b6687_rle_crop_3744952042_0.png.png imagette219919181743626941/1743626462_1517322_1349625271_c7fcef5a0f65e10b42fe9dc515e6ff50_rle_crop_3744987935_0.png.png imagette219919181743626941/1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945564_0.png.png imagette219919181743626941/1743626472_1517511_1349625297_f94439d9eda5b0467b443b7d41af9c60_rle_crop_3744987989_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/0e985173444aad818d52d53a13d7033f_84606560.png imagette219919181743626941 21991921 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=21991921 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349625069: '1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958267_0.png', 1349625070: '1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958268_0.png', 1349625585: '1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978638_0.png', 1349625750: '1743626462_1517322_1349625256_16953c27429b548144ccb4077371b8f0_rle_crop_3744987961_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/083ac4f835edea73c3a0ab934c9fe33d_38188188.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/716b4902c19fe7d888352d2bfddb9408_22533733.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/61a99656e1523aa68a0ac8318298dff0_98714708.png change filename to text .imagette219919211743626942/ imagette219919211743626942/1743626462_1517322_1349625256_16953c27429b548144ccb4077371b8f0_rle_crop_3744987961_0.png.png imagette219919211743626942/1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958268_0.png.png imagette219919211743626942/1743626392_1516278_1349624941_1a42390d1688b741d595411429440c82_rle_crop_3744978638_0.png.png imagette219919211743626942/1743626231_1514982_1349624722_fbed6a9dcada338e4ccb7d0c006e4fb9_rle_crop_3744958267_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/742d3e911b13d39c2d54b5332bfd8c87_1085081.png imagette219919211743626942 21991925 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=21991925 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349624793: '1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945558_0.png', 1349624794: '1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945554_0.png', 1349624795: '1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945553_0.png', 1349624796: '1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945570_0.png', 1349624797: '1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945569_0.png', 1349624869: '1743626131_1514050_1349624355_363fc6578eaa58c26220eb9269a43496_rle_crop_3744945687_0.png', 1349625333: '1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976061_0.png', 1349625550: '1743626392_1516278_1349624925_6f6caa89690253adc04814f0d4e53abb_rle_crop_3744978656_0.png', 1349625742: '1743626462_1517322_1349625262_1d6017c6f5539b81cb165ada0da70c9f_rle_crop_3744987947_0.png', 1349625765: '1743626472_1517511_1349625084_feb584b539b4d55a419af613ee4c4de2_rle_crop_3744991644_0.png', 1349627098: '1743626712_1519461_1349625787_14fb30c4dd01c77d68415451b2d8d33c_rle_crop_3745007799_0.png', 1349628954: '1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042102_0.png', 1349628955: '1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042115_0.png', 1349628957: '1743626854_1521446_1349626522_d8eaaa57b13bf875b0b217de079cfb52_rle_crop_3745042145_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/9cf1ef448df2ee036a521009584ce018_62904705.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/0c0f6291945ae21b23126388c63c7cfd_5455615.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/19e51487652f2b11fd4fb8cf0d6e1e82_85373391.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/7d3091a85dce31fd7ad2b35179c28af4_74349305.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/5204dda54b47caf61a2b7cd06e819e33_30231819.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/a3ef95513efcf11fbd1d48135ac6e293_79928029.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/6f18c023842941c4ddbbd4be69aba6e4_65426417.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/c22757098f496196cf5bff60bb259c61_67975603.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/91b74181586c6f93434e6a43a20f3f42_2898226.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/65ad50bc08a98e120c8a0ed2a1e1f1f0_75766057.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/57693bb141a27a33d8471b49aec2cdf4_62821601.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/18aad9ab2e78b414b8d107e927173498_5149600.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/83660951483090d37ae5edfc0dbdb89d_97519381.png change filename to text .imagette219919251743626942/ imagette219919251743626942/1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945558_0.png.png imagette219919251743626942/1743626854_1521446_1349626522_d8eaaa57b13bf875b0b217de079cfb52_rle_crop_3745042145_0.png.png imagette219919251743626942/1743626131_1514050_1349624355_363fc6578eaa58c26220eb9269a43496_rle_crop_3744945687_0.png.png imagette219919251743626942/1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945569_0.png.png imagette219919251743626942/1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945553_0.png.png imagette219919251743626942/1743626472_1517511_1349625084_feb584b539b4d55a419af613ee4c4de2_rle_crop_3744991644_0.png.png imagette219919251743626942/1743626462_1517322_1349625262_1d6017c6f5539b81cb165ada0da70c9f_rle_crop_3744987947_0.png.png imagette219919251743626942/1743626114_1513814_1349623964_ba2d0b33d86c52074cfe50a3c94c7c48_rle_crop_3744945570_0.png.png imagette219919251743626942/1743626854_1521446_1349626571_81309ee66009246c74f6e5875e6385ed_rle_crop_3745042115_0.png.png imagette219919251743626942/1743626392_1516278_1349624925_6f6caa89690253adc04814f0d4e53abb_rle_crop_3744978656_0.png.png imagette219919251743626942/1743626712_1519461_1349625787_14fb30c4dd01c77d68415451b2d8d33c_rle_crop_3745007799_0.png.png imagette219919251743626942/1743626114_1513814_1349624387_281f0892de96ad48b40b3401d8c3ff3e_rle_crop_3744945554_0.png.png imagette219919251743626942/1743626854_1521446_1349626603_95199d19662a8be5a2f0d7457b2c9c14_rle_crop_3745042102_0.png.png imagette219919251743626942/1743626351_1515799_1349625029_d2f5b3417038ecdea26145b9f66f7747_rle_crop_3744976061_0.png.png wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/50c5f0682423cf9ff7c91e525da9c8a2_54765061.png imagette219919251743626942 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21991914 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21991928,21991929,21991930,21991931,21991932,21991933,21991934,21991935,21991936,21991937,21991938,21991939?tags=metal,mal_croppe,Carton_gris,cartonnette,kraft,Carton_brun,flou,environnement,papier,Teint_Dans_La_Masse,plastique,autre_refus your option no_mail is active, we will not send the real mail to your client args[1349627394] : ('0.04052662425498596',) no score found for photo 1349627394 We are sending mail with results at report@fotonower.com refus_total : 0.04052662425498596 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=21991914 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_P21991914_02-04-2025_22_48_59.pdf results_Auto_P21991914_02-04-2025_22_48_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21991914_02-04-2025_22_48_59.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','21991914','results_Auto_P21991914_02-04-2025_22_48_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21991914_02-04-2025_22_48_59.pdf','pdf','','0.17','0.04052662425498596') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21991914]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349627394] map_info['map_portfolio_photo'] : {21991914: [1349627394, 1349626931, 1349626910, 1349626895, 1349626804, 1349626620, 1349626603, 1349626571, 1349626547, 1349626522, 1349626484, 1349626208, 1349626183, 1349626179, 1349626158, 1349626133, 1349626076, 1349625787, 1349625783, 1349625779, 1349625775, 1349625764, 1349625525, 1349625521, 1349625297, 1349625271, 1349625262, 1349625256, 1349625144, 1349625125, 1349625117, 1349625108, 1349625097, 1349625084, 1349625032, 1349625029, 1349625025, 1349624963, 1349624947, 1349624941, 1349624925, 1349624905, 1349624779, 1349624776, 1349624772, 1349624750, 1349624722, 1349624697, 1349624387, 1349624355, 1349624317, 1349624273, 1349623977, 1349623964]} final : False mtd_id 4302 list_pids : [1349627394] 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, '2717994') ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 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', '21991914', '1349627394', None, None, None, None, None, '2717994')] time used for this insertion : 2.0946223735809326 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.211149454116821 time spend to save output : 2.094785690307617 total time spend for step 4 : 6.3059351444244385 step5:split_time_score Wed Apr 2 22:49:05 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21991914'] 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 : [('21991914',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21991914) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349627394: {'path': 'temp/1743626939_3911276_1349627394_37138ffb2980adcd5e02970c554d1265.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 = 21991914; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 21991914 group by h (('22', 54),) 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=21991914 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 (21991914) 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 (21991914) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02042025 21991914 Nombre de photos uploadées : 54 / 23040 (0%) 02042025 21991914 Nombre de photos taguées (types de déchets): 0 / 54 (0%) 02042025 21991914 Nombre de photos taguées (volume) : 0 / 54 (0%) [{'photo_id': 1349623977, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/e71d9a9bf2cbd6c91c52c3f3e4319b83.jpg', 'username': None, 'uploaded_at': 1743625987, 'text': 'image_02042025_22_30_15_10136.jpg'}, {'photo_id': 1349623964, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/ba2d0b33d86c52074cfe50a3c94c7c48.jpg', 'username': None, 'uploaded_at': 1743625987, 'text': 'image_02042025_22_32_45_010138m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349624387, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/281f0892de96ad48b40b3401d8c3ff3e.jpg', 'username': None, 'uploaded_at': 1743626047, 'text': 'image_02042025_22_32_55_010137m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349624355, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/2/363fc6578eaa58c26220eb9269a43496.jpg', 'username': None, 'uploaded_at': 1743626047, 'text': 'image_02042025_22_33_04_9140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ?????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0021827220916748047 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21991914, '2025-04-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1709477,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.026546001434326172 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= 1709477 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1709477, 'dashboard_run_id': 1719377, 'mtr_portfolio_id': 21990543, 'dashboard_result_id': 9822993, '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_P21990543_02-04-2025_22_19_04.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990548, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990549, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990550, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990551, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990555, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21990556, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990559, 'pht': 3726}}"}, {'dashboat_entry_day': 1709477, 'dashboard_run_id': 1719377, 'mtr_portfolio_id': 21990823, 'dashboard_result_id': 9822994, '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_P21990823_02-04-2025_22_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21990864, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990865, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990866, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990867, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990868, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990869, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990871, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990874, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990875, 'pht': 3726}}"}, {'dashboat_entry_day': 1709477, 'dashboard_run_id': 1719377, 'mtr_portfolio_id': 21991914, 'dashboard_result_id': 9822995, '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_P21991914_02-04-2025_22_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21991916, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21991917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21991918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21991919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21991920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21991921, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21991922, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21991923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21991924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21991925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21991926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21991927, 'pht': 3726}}"}, {'dashboat_entry_day': 1709477, 'dashboard_run_id': 1719377, 'mtr_portfolio_id': 21992485, 'dashboard_result_id': 9822996, '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 = 21990543 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2717915, 'mtr_portfolio_id': 21990543, 'created_at': datetime.datetime(2025, 4, 2, 22, 19, 4), 'result': '0.055189092431571114', 'result_long': None, 'result_double': None}] Qualite : 0.055189092431571114 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21990543 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21990543_02-04-2025_22_19_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21990543 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_P21990543_02-04-2025_22_19_04.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990548, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990549, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990550, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990551, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990555, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21990556, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990559, 'pht': 3726}}" where mtr_portfolio_id = 21990543 and dashboard_run_id = 1719377 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21990543 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9822993, 0.055189092431571114, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21990543_02-04-2025_22_19_04.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990548, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990549, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990550, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990551, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990555, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21990556, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990559, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21990823 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2717931, 'mtr_portfolio_id': 21990823, 'created_at': datetime.datetime(2025, 4, 2, 22, 33), 'result': '0.04877417881972289', 'result_long': None, 'result_double': None}] Qualite : 0.04877417881972289 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21990823 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21990823_02-04-2025_22_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21990823 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_P21990823_02-04-2025_22_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21990864, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990865, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990866, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990867, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990868, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990869, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990871, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990874, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990875, 'pht': 3726}}" where mtr_portfolio_id = 21990823 and dashboard_run_id = 1719377 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21990823 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9822994, 0.04877417881972289, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21990823_02-04-2025_22_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21990864, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21990865, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21990866, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21990867, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21990868, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21990869, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21990870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21990871, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21990872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21990873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21990874, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21990875, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21991914 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2717994, 'mtr_portfolio_id': 21991914, 'created_at': datetime.datetime(2025, 4, 2, 22, 48, 59), 'result': '0.04052662425498596', 'result_long': None, 'result_double': None}] Qualite : 0.04052662425498596 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21991914 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21991914_02-04-2025_22_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21991914 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_P21991914_02-04-2025_22_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21991916, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21991917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21991918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21991919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21991920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21991921, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21991922, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21991923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21991924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21991925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21991926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21991927, 'pht': 3726}}" where mtr_portfolio_id = 21991914 and dashboard_run_id = 1719377 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21991914 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9822995, 0.04052662425498596, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21991914_02-04-2025_22_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21991916, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21991917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21991918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21991919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21991920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21991921, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21991922, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21991923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21991924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21991925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21991926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21991927, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21992485 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 = 21992485 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21992485 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%21992485%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21992485 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': ''}" where mtr_portfolio_id = 21992485 and dashboard_run_id = 1719377 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21990543,21990823,21991914,21992485) result : ((1349612181,), (1349612638,), (1349612673,), (1349612704,), (1349612740,), (1349612793,), (1349612820,), (1349613088,), (1349613122,), (1349613148,), (1349613384,), (1349613402,), (1349613429,), (1349613464,), (1349613640,), (1349613643,), (1349613648,), (1349613653,), (1349613656,), (1349613660,), (1349614154,), (1349613859,), (1349613915,), (1349613967,), (1349614017,), (1349614081,), (1349614680,), (1349614710,), (1349615364,), (1349615387,), (1349615422,), (1349615777,), (1349615825,), (1349616243,), (1349616266,), (1349616307,), (1349616350,), (1349616399,), (1349616983,), (1349617024,), (1349617062,), (1349617089,), (1349617643,), (1349617744,), (1349617768,), (1349617822,), (1349617858,), (1349617904,), (1349618260,), (1349618414,), (1349618517,), (1349618657,), (1349618780,), (1349618857,), (1349619299,), (1349619316,), (1349619342,), (1349619370,), (1349619553,), (1349619577,), (1349619601,), (1349619623,), (1349619675,), (1349619747,), (1349620184,), (1349620201,), (1349620432,), (1349620737,), (1349620777,), (1349620834,), (1349620902,), (1349621535,), (1349621598,), (1349621648,), (1349621721,), (1349621782,), (1349622130,), (1349622158,), (1349622191,), (1349622626,), (1349623964,), (1349623977,), (1349624273,), (1349624317,), (1349624355,), (1349624387,), (1349624697,), (1349624722,), (1349624750,), (1349624772,), (1349624776,), (1349624779,), (1349624905,), (1349624925,), (1349624941,), (1349624947,), (1349624963,), (1349625025,), (1349625029,), (1349625032,), (1349625084,), (1349625097,), (1349625108,), (1349625117,), (1349625125,), (1349625144,), (1349625256,), (1349625262,), (1349625271,), (1349625297,), (1349625521,), (1349625525,), (1349625764,), (1349625775,), (1349625779,), (1349625783,), (1349625787,), (1349626076,), (1349626133,), (1349626158,), (1349626179,), (1349626183,), (1349626208,), (1349626484,), (1349626522,), (1349626547,), (1349626571,), (1349626603,), (1349626620,), (1349626804,), (1349626895,), (1349626910,), (1349626931,), (1349627394,), (1349627184,), (1349627209,), (1349627256,), (1349627304,), (1349627345,), (1349628007,), (1349628053,), (1349628085,), (1349628149,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02042025': {'nb_upload': 54, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21991914]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349627394] map_info['map_portfolio_photo'] : {21991914: [1349627394, 1349626931, 1349626910, 1349626895, 1349626804, 1349626620, 1349626603, 1349626571, 1349626547, 1349626522, 1349626484, 1349626208, 1349626183, 1349626179, 1349626158, 1349626133, 1349626076, 1349625787, 1349625783, 1349625779, 1349625775, 1349625764, 1349625525, 1349625521, 1349625297, 1349625271, 1349625262, 1349625256, 1349625144, 1349625125, 1349625117, 1349625108, 1349625097, 1349625084, 1349625032, 1349625029, 1349625025, 1349624963, 1349624947, 1349624941, 1349624925, 1349624905, 1349624779, 1349624776, 1349624772, 1349624750, 1349624722, 1349624697, 1349624387, 1349624355, 1349624317, 1349624273, 1349623977, 1349623964]} final : True mtd_id 4302 list_pids : [1349627394] Looping around the photos to save general results len do output : 1 /21991914Didn'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, '2717994') ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '21991914', 'None', None, None, None, None, '2717994'), ('4302', '21991914', '1349627394', None, None, None, None, None, '2717994')] time used for this insertion : 0.012306690216064453 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1104588508605957 time spend to save output : 0.012531280517578125 total time spend for step 5 : 1.1229901313781738 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 (2717994) 2.06user 2.26system 0:14.34elapsed 30%CPU (0avgtext+0avgdata 155336maxresident)k 136inputs+7504outputs (1major+61822minor)pagefaults 0swaps