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 : 1753961 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 (3570026) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3570026) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127621 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3570026'] with mtr_portfolio_ids : ['26127621'] and first list_photo_ids : [] new path : /proc/1753961/ Name: python3 Umask: 0002 State: R (running) Tgid: 1753961 Ngid: 0 Pid: 1753961 PPid: 1753960 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1753961 NSpid: 1753961 NSpgid: 1751654 NSsid: 1751654 VmPeak: 1107248 kB VmSize: 1107248 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98808 kB VmRSS: 98808 kB RssAnon: 60156 kB RssFile: 38652 kB RssShmem: 0 kB VmData: 866000 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 620 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 56 nonvoluntary_ctxt_switches: 94 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1753961', 'Ngid': '0', 'Pid': '1753961', 'PPid': '1753960', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1753961', 'NSpid': '1753961', 'NSpgid': '1751654', 'NSsid': '1751654', 'VmPeak': '1107248 kB', 'VmSize': '1107248 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98808 kB', 'VmRSS': '98808 kB', 'RssAnon': '60156 kB', 'RssFile': '38652 kB', 'RssShmem': '0 kB', 'VmData': '866000 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '620 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '56', 'nonvoluntary_ctxt_switches': '94'} ('datou_batch_current', '1753961', '1107248', '0', '1107248', '866000', '98808', b'', 'marlene', '3570026') 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 (26127621) 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 (3570026 ) ) 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 (26127621) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1378380373, 'portfolio_id': 26127621}, {'photo_id': 1378372739, 'portfolio_id': 26127621}, {'photo_id': 1378372736, 'portfolio_id': 26127621}, {'photo_id': 1378372733, 'portfolio_id': 26127621}, {'photo_id': 1378372729, 'portfolio_id': 26127621}, {'photo_id': 1378372673, 'portfolio_id': 26127621}, {'photo_id': 1378372670, 'portfolio_id': 26127621}, {'photo_id': 1378372668, 'portfolio_id': 26127621}, {'photo_id': 1378372665, 'portfolio_id': 26127621}, {'photo_id': 1378372560, 'portfolio_id': 26127621}, {'photo_id': 1378372532, 'portfolio_id': 26127621}, {'photo_id': 1378372525, 'portfolio_id': 26127621}, {'photo_id': 1378372522, 'portfolio_id': 26127621}, {'photo_id': 1378372518, 'portfolio_id': 26127621}, {'photo_id': 1378372337, 'portfolio_id': 26127621}, {'photo_id': 1378372306, 'portfolio_id': 26127621}, {'photo_id': 1378372278, 'portfolio_id': 26127621}, {'photo_id': 1378372137, 'portfolio_id': 26127621}, {'photo_id': 1378372136, 'portfolio_id': 26127621}, {'photo_id': 1378372133, 'portfolio_id': 26127621}, {'photo_id': 1378372132, 'portfolio_id': 26127621}, {'photo_id': 1378372129, 'portfolio_id': 26127621}, {'photo_id': 1378372128, 'portfolio_id': 26127621}, {'photo_id': 1378372081, 'portfolio_id': 26127621}, {'photo_id': 1378372054, 'portfolio_id': 26127621}, {'photo_id': 1378372048, 'portfolio_id': 26127621}, {'photo_id': 1378372045, 'portfolio_id': 26127621}, {'photo_id': 1378372042, 'portfolio_id': 26127621}, {'photo_id': 1378371892, 'portfolio_id': 26127621}, {'photo_id': 1378371865, 'portfolio_id': 26127621}, {'photo_id': 1378371840, 'portfolio_id': 26127621}, {'photo_id': 1378371813, 'portfolio_id': 26127621}, {'photo_id': 1378371784, 'portfolio_id': 26127621}, {'photo_id': 1378371492, 'portfolio_id': 26127621}, {'photo_id': 1378371490, 'portfolio_id': 26127621}, {'photo_id': 1378371487, 'portfolio_id': 26127621}, {'photo_id': 1378371485, 'portfolio_id': 26127621}, {'photo_id': 1378371483, 'portfolio_id': 26127621}, {'photo_id': 1378371442, 'portfolio_id': 26127621}, {'photo_id': 1378371439, 'portfolio_id': 26127621}, {'photo_id': 1378371436, 'portfolio_id': 26127621}, {'photo_id': 1378371281, 'portfolio_id': 26127621}, {'photo_id': 1378371279, 'portfolio_id': 26127621}, {'photo_id': 1378371261, 'portfolio_id': 26127621}, {'photo_id': 1378371239, 'portfolio_id': 26127621}, {'photo_id': 1378371144, 'portfolio_id': 26127621}, {'photo_id': 1378371141, 'portfolio_id': 26127621}, {'photo_id': 1378371134, 'portfolio_id': 26127621}, {'photo_id': 1378371103, 'portfolio_id': 26127621}, {'photo_id': 1378371099, 'portfolio_id': 26127621}, {'photo_id': 1378371095, 'portfolio_id': 26127621}, {'photo_id': 1378371092, 'portfolio_id': 26127621}, {'photo_id': 1378371090, 'portfolio_id': 26127621}, {'photo_id': 1378371073, 'portfolio_id': 26127621}, {'photo_id': 1378371049, 'portfolio_id': 26127621}, {'photo_id': 1378371033, 'portfolio_id': 26127621}, {'photo_id': 1378370993, 'portfolio_id': 26127621}, {'photo_id': 1378370674, 'portfolio_id': 26127621}, {'photo_id': 1378370671, 'portfolio_id': 26127621}] map_portfolio_id_photo_id: {26127621: [1378380373, 1378372739, 1378372736, 1378372733, 1378372729, 1378372673, 1378372670, 1378372668, 1378372665, 1378372560, 1378372532, 1378372525, 1378372522, 1378372518, 1378372337, 1378372306, 1378372278, 1378372137, 1378372136, 1378372133, 1378372132, 1378372129, 1378372128, 1378372081, 1378372054, 1378372048, 1378372045, 1378372042, 1378371892, 1378371865, 1378371840, 1378371813, 1378371784, 1378371492, 1378371490, 1378371487, 1378371485, 1378371483, 1378371442, 1378371439, 1378371436, 1378371281, 1378371279, 1378371261, 1378371239, 1378371144, 1378371141, 1378371134, 1378371103, 1378371099, 1378371095, 1378371092, 1378371090, 1378371073, 1378371049, 1378371033, 1378370993, 1378370674, 1378370671]} ##### 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.017926931381225586 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Aug 22 01:32:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26127621) 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 : 26127621 get user id for portfolio 26127621 get sub ptf for main ptf 26127621, type 3726 and hashtags ['flou', 'plastique', 'mal_croppe', 'metal', 'Teint_Dans_La_Masse', 'papier', 'kraft', 'cartonnette', 'autre_refus', 'environnement', 'Carton_brun', 'Carton_gris'] 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`=26127621 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','metal','Teint_Dans_La_Masse','papier','kraft','cartonnette','autre_refus','environnement','Carton_brun','Carton_gris')) 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`=26127621 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','metal','Teint_Dans_La_Masse','papier','kraft','cartonnette','autre_refus','environnement','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 26127621, 'sub_port_id': 26127652, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598783, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'Carton_gris': {'main_port_id': 26127621, 'sub_port_id': 26127653, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598784, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'plastique': {'main_port_id': 26127621, 'sub_port_id': 26127656, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598785, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'papier': {'main_port_id': 26127621, 'sub_port_id': 26127658, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598786, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'autre_refus': {'main_port_id': 26127621, 'sub_port_id': 26127660, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598787, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 26127621, 'sub_port_id': 26127662, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598788, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'Carton_brun': {'main_port_id': 26127621, 'sub_port_id': 26127665, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598789, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'environnement': {'main_port_id': 26127621, 'sub_port_id': 26127667, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598790, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'mal_croppe': {'main_port_id': 26127621, 'sub_port_id': 26127669, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598791, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'metal': {'main_port_id': 26127621, 'sub_port_id': 26127671, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598792, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'kraft': {'main_port_id': 26127621, 'sub_port_id': 26127674, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598793, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}, 'cartonnette': {'main_port_id': 26127621, 'sub_port_id': 26127675, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598794, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26127652 , 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=26127621 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 (26127652) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127653 , 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=26127621 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 (26127653) result : ((1378372630,), (1378374134,), (1378374891,), (1378375481,), (1378376816,), (1378377886,), (1378377887,), (1378378971,), (1378379459,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127656 , 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=26127621 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 (26127656) result : ((1378372639,), (1378373661,), (1378377890,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127658 , 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=26127621 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 (26127658) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127660 , 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=26127621 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 (26127660) result : ((1378375260,), (1378376227,), (1378378963,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127662 , 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=26127621 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 (26127662) result : ((1378372620,), (1378372622,), (1378372623,), (1378373656,), (1378373657,), (1378374854,), (1378374859,), (1378374863,), (1378374867,), (1378374871,), (1378375256,), (1378375257,), (1378375258,), (1378375259,), (1378375468,), (1378375470,), (1378375472,), (1378376222,), (1378376223,), (1378376224,), (1378376225,), (1378376243,), (1378376814,), (1378376815,), (1378377882,), (1378377883,), (1378377885,), (1378378956,), (1378379446,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127665 , 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=26127621 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 (26127665) result : ((1378372632,), (1378373660,), (1378375498,), (1378379481,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127667 , 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=26127621 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 (26127667) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127669 , 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=26127621 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 (26127669) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127671 , 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=26127621 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 (26127671) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127674 , 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=26127621 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 (26127674) result : ((1378376248,), (1378376249,), (1378376819,), (1378377892,), (1378378986,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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 26127675 , 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=26127621 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 (26127675) result : ((1378373659,), (1378375488,), (1378375490,), (1378376228,), (1378376245,), (1378376246,), (1378376247,), (1378377888,), (1378378978,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26127621) result : ((1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,)) 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`=26127621 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','metal','Teint_Dans_La_Masse','papier','kraft','cartonnette','autre_refus','environnement','Carton_brun','Carton_gris')) 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`=26127621 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','metal','Teint_Dans_La_Masse','papier','kraft','cartonnette','autre_refus','environnement','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 26127621, 'sub_port_id': 26127676, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598795, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'Carton_gris': {'main_port_id': 26127621, 'sub_port_id': 26127677, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598796, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'plastique': {'main_port_id': 26127621, 'sub_port_id': 26127678, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598797, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'papier': {'main_port_id': 26127621, 'sub_port_id': 26127679, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598798, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'autre_refus': {'main_port_id': 26127621, 'sub_port_id': 26127680, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598799, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'Teint_Dans_La_Masse': {'main_port_id': 26127621, 'sub_port_id': 26127681, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598800, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'Carton_brun': {'main_port_id': 26127621, 'sub_port_id': 26127682, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598801, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'environnement': {'main_port_id': 26127621, 'sub_port_id': 26127683, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598802, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'mal_croppe': {'main_port_id': 26127621, 'sub_port_id': 26127684, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598803, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'metal': {'main_port_id': 26127621, 'sub_port_id': 26127685, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598804, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'kraft': {'main_port_id': 26127621, 'sub_port_id': 26127686, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598805, 'last_updated_at': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 0, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}, 'cartonnette': {'main_port_id': 26127621, 'sub_port_id': 26127687, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17598806, 'last_updated_at': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 22, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 22, 0, 49, 32)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127676,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127652 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127677,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127653 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127678,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127656 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127679,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127658 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127680,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127660 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127681,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127662 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127682,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127665 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127683,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127667 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127684,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127669 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127685,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127671 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127686,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127674 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26127687,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26127675 lien utilise dans velours : https://www.fotonower.com/velours/26127676,26127677,26127678,26127679,26127680,26127681,26127682,26127683,26127684,26127685,26127686,26127687?tags=flou,Carton_gris,plastique,papier,autre_refus,Teint_Dans_La_Masse,Carton_brun,environnement,mal_croppe,metal,kraft,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26127621]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1378380373] map_info['map_portfolio_photo'] : {26127621: [1378380373, 1378372739, 1378372736, 1378372733, 1378372729, 1378372673, 1378372670, 1378372668, 1378372665, 1378372560, 1378372532, 1378372525, 1378372522, 1378372518, 1378372337, 1378372306, 1378372278, 1378372137, 1378372136, 1378372133, 1378372132, 1378372129, 1378372128, 1378372081, 1378372054, 1378372048, 1378372045, 1378372042, 1378371892, 1378371865, 1378371840, 1378371813, 1378371784, 1378371492, 1378371490, 1378371487, 1378371485, 1378371483, 1378371442, 1378371439, 1378371436, 1378371281, 1378371279, 1378371261, 1378371239, 1378371144, 1378371141, 1378371134, 1378371103, 1378371099, 1378371095, 1378371092, 1378371090, 1378371073, 1378371049, 1378371033, 1378370993, 1378370674, 1378370671]} final : False mtd_id 4302 list_pids : [1378380373] Looping around the photos to save general results len do output : 1 /26127621. 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, '3570026') ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026') 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, '26127621', "{'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675}", None, None, None, None, '3570026'), ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026')] time used for this insertion : 0.012674808502197266 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2414891719818115 time spend to save output : 0.012953758239746094 total time spend for step 1 : 2.2544429302215576 step2:final Fri Aug 22 01:33:00 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 (26127621) 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 26127621 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1378370674,1378370671,1378371073,1378371049,1378371033,1378370993,1378371103,1378371099,1378371095,1378371092,1378371090,1378371144,1378371141,1378371134,1378371281,1378371279,1378371261,1378371239,1378371442,1378371439,1378371436,1378371492,1378371490,1378371487,1378371485,1378371483,1378371892,1378371865,1378371840,1378371813,1378371784,1378372081,1378372054,1378372048,1378372045,1378372042,1378372136,1378372137,1378372132,1378372133,1378372128,1378372129,1378372337,1378372306,1378372278,1378372560,1378372532,1378372525,1378372522,1378372518,1378372673,1378372670,1378372668,1378372665,1378372739,1378372736,1378372733,1378372729,1378380373); 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([26127621]) Inside saveOutput : final : False verbose : True original output for save of step final : {1378380373: ('0.05724743282693976',)} new output for save of step final : {1378380373: ('0.05724743282693976',)} [1378380373] map_info['map_portfolio_photo'] : {26127621: [1378380373, 1378372739, 1378372736, 1378372733, 1378372729, 1378372673, 1378372670, 1378372668, 1378372665, 1378372560, 1378372532, 1378372525, 1378372522, 1378372518, 1378372337, 1378372306, 1378372278, 1378372137, 1378372136, 1378372133, 1378372132, 1378372129, 1378372128, 1378372081, 1378372054, 1378372048, 1378372045, 1378372042, 1378371892, 1378371865, 1378371840, 1378371813, 1378371784, 1378371492, 1378371490, 1378371487, 1378371485, 1378371483, 1378371442, 1378371439, 1378371436, 1378371281, 1378371279, 1378371261, 1378371239, 1378371144, 1378371141, 1378371134, 1378371103, 1378371099, 1378371095, 1378371092, 1378371090, 1378371073, 1378371049, 1378371033, 1378370993, 1378370674, 1378370671]} final : False mtd_id 4302 list_pids : [1378380373] Looping around the photos to save general results len do output : 1 /1378380373.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, '3570026') ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026') 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', '26127621', '1378380373', '0.05724743282693976', None, None, None, None, '3570026')] time used for this insertion : 0.01404428482055664 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07563066482543945 time spend to save output : 0.01420903205871582 total time spend for step 2 : 0.08983969688415527 step3:velours_tree Fri Aug 22 01:33:00 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 : {26127621: [{'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675}]} input_args_next_step : {26127621: ()} output_args : {26127621: [{'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675}]} args : 26127621 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 : ({'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26127621) 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([26127621]) 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.3080437183380127 time spend to save output : 5.698204040527344e-05 total time spend for step 3 : 0.30810070037841797 step4:send_mail_cod Fri Aug 22 01:33:00 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 : {1378380373: ('0.05724743282693976',)} input_args_next_step : {1378380373: ()} output_args : {1378380373: ('0.05724743282693976',)} args : 1378380373 depend.output_id : 0 complete output_args for input 3 : {26127621: [{'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675}]} input_args_next_step : {1378380373: ('0.05724743282693976',), 26127621: ()} output_args : {26127621: [{'flou': 26127652, 'Carton_gris': 26127653, 'plastique': 26127656, 'papier': 26127658, 'autre_refus': 26127660, 'Teint_Dans_La_Masse': 26127662, 'Carton_brun': 26127665, 'environnement': 26127667, 'mal_croppe': 26127669, 'metal': 26127671, 'kraft': 26127674, 'cartonnette': 26127675}]} args : 26127621 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.05724743282693976',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26127621) 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 (1378380373) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1378380373 download finish for photo 1378380373 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette261276521755819180/ length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P26127621_22-08-2025_01_33_00.pdf 26127652 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=26127652 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261276521755819180 26127656 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=26127656 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378372639: '1755817047_441823_1378371279_6ba375bd5710d39e1e8c3541ebff51d9_rle_crop_3924051441_0.png', 1378373661: '1755817406_454921_1378372668_dc16bee9ab842658a60fd08554ab0ed1_rle_crop_3924062661_0.png', 1378377890: '1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094858_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/051794186bb4d7fd89b8333cdbea5d48_23858291.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/84a82c8739c4266ac756b6919fbc8bb0_26043859.png change filename to text .imagette261276561755819180/ imagette261276561755819180/1755817406_454921_1378372668_dc16bee9ab842658a60fd08554ab0ed1_rle_crop_3924062661_0.png.png imagette261276561755819180/1755817047_441823_1378371279_6ba375bd5710d39e1e8c3541ebff51d9_rle_crop_3924051441_0.png.png imagette261276561755819180/1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094858_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/44b79a6540b0a8ad3cfd8ccfec544712_80252620.png imagette261276561755819180 26127660 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=26127660 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378375260: '1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072478_0.png', 1378376227: '1755817947_478874_1378372081_b38fedd3a06f447a9eb6132b2be3df57_rle_crop_3924080932_0.png', 1378378963: '1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101160_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/eea8060adcb613f97c544328b8fd2eab_74073940.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/dacfa425869f40bbb133d041e9392960_7541766.png change filename to text .imagette261276601755819180/ imagette261276601755819180/1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072478_0.png.png imagette261276601755819180/1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101160_0.png.png imagette261276601755819180/1755817947_478874_1378372081_b38fedd3a06f447a9eb6132b2be3df57_rle_crop_3924080932_0.png.png imagette261276691755819181/ imagette261276711755819181/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/74a76de8733ee542e4b42a32d5149fee_2409568.png imagette261276601755819180 26127669 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=26127669 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261276691755819181 26127671 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=26127671 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette261276711755819181 26127674 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=26127674 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378376248: '1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079829_0.png', 1378376249: '1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079823_0.png', 1378376819: '1755818127_487100_1378371485_84cc69459e180f5e686526668b891ffe_rle_crop_3924086250_0.png', 1378377892: '1755818364_496121_1378371099_35415cc675baebd8843fd7547ddee70b_rle_crop_3924094847_0.png', 1378378986: '1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101165_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/dc31e6d5b5d4ab4de6b0541bbabf702a_12881788.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/0939f49500927090abf9faf2ee6c4532_13058912.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/521bab6dc88ef0ed4bcddb1eb00dc604_21764659.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/e55c1f0dde9111d4e8f09dbfcba45ecc_45999731.png change filename to text .imagette261276741755819181/ imagette261276741755819181/1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101165_0.png.png imagette261276741755819181/1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079829_0.png.png imagette261276741755819181/1755818364_496121_1378371099_35415cc675baebd8843fd7547ddee70b_rle_crop_3924094847_0.png.png imagette261276741755819181/1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079823_0.png.png imagette261276741755819181/1755818127_487100_1378371485_84cc69459e180f5e686526668b891ffe_rle_crop_3924086250_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/437085aedc6577967e161f43debd340c_87424489.png imagette261276741755819181 26127675 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=26127675 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378373659: '1755817406_454921_1378372665_3df47f8f7ade1aafe8606a38b6387e3b_rle_crop_3924062679_0.png', 1378375488: '1755817765_473396_1378372560_7d507b4bcd46be6953d0335c3adb4922_rle_crop_3924075971_0.png', 1378375490: '1755817765_473396_1378372278_047d668cec420ab81ffbcb3272609546_rle_crop_3924076004_0.png', 1378376228: '1755817947_478874_1378371865_04cb16f29969d81fd5b933874e51f281_rle_crop_3924080945_0.png', 1378376245: '1755818007_482178_1378372054_77479b67831a752eba46bdf52bb3d411_rle_crop_3924079800_0.png', 1378376246: '1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079821_0.png', 1378376247: '1755818007_482178_1378372042_6a1a20e9ca01fa51276d4e42c5b72493_rle_crop_3924079937_0.png', 1378377888: '1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094773_0.png', 1378378978: '1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101163_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/fee13a298d0079c7548eb7f87b025426_27954688.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/82ee0b59595036b0ff71403007d5ea51_61547326.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/ee58399bff5600e96c2d19140d471b5c_1629377.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1e323d4fcc7a86d7f1db5b6ece000589_92644058.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/61d3a1df1114d99ed1cb8de8b78adc46_20612025.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/2dda8c7d87130639a960e1451847f78a_2670088.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/5df7f7205e2e18694e8fee52fec8538a_37292592.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/cb609e7062c5463a12ab46318da573ec_90076791.png change filename to text .imagette261276751755819181/ imagette261276751755819181/1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079821_0.png.png imagette261276751755819181/1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094773_0.png.png imagette261276751755819181/1755817765_473396_1378372278_047d668cec420ab81ffbcb3272609546_rle_crop_3924076004_0.png.png imagette261276751755819181/1755818007_482178_1378372054_77479b67831a752eba46bdf52bb3d411_rle_crop_3924079800_0.png.png imagette261276751755819181/1755818007_482178_1378372042_6a1a20e9ca01fa51276d4e42c5b72493_rle_crop_3924079937_0.png.png imagette261276751755819181/1755817406_454921_1378372665_3df47f8f7ade1aafe8606a38b6387e3b_rle_crop_3924062679_0.png.png imagette261276751755819181/1755818606_505243_1378371103_a4822024c1edd53418a354c10127e730_rle_crop_3924101163_0.png.png imagette261276751755819181/1755817947_478874_1378371865_04cb16f29969d81fd5b933874e51f281_rle_crop_3924080945_0.png.png imagette261276751755819181/1755817765_473396_1378372560_7d507b4bcd46be6953d0335c3adb4922_rle_crop_3924075971_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/26bd3220d4282b8ea6cadf3dbf600c7b_695001.png imagette261276751755819181 26127653 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=26127653 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378372630: '1755817047_441823_1378371261_f5e9b861d749838b18100531e72f3948_rle_crop_3924051452_0.png', 1378374134: '1755817527_461460_1378372729_0c8f495bfe1e578252080753977043bc_rle_crop_3924067383_0.png', 1378374891: '1755817584_465064_1378372525_01d9a41ca6bdfea90217fc40c9ee7e6d_rle_crop_3924067845_0.png', 1378375481: '1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075996_0.png', 1378376816: '1755818127_487100_1378371485_84cc69459e180f5e686526668b891ffe_rle_crop_3924086249_0.png', 1378377886: '1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094852_0.png', 1378377887: '1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094860_0.png', 1378378971: '1755818606_505243_1378371049_78c23e151c60a953ade2a6b20a55bc00_rle_crop_3924101172_0.png', 1378379459: '1755818727_508708_1378370674_dc1bf349cd46c750cd70aee35aa0e82f_rle_crop_3924104810_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/66ee8f1f9e41b024bcc3411e3b8f7c53_51851494.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/24c0bc60c80dc8df30786340bc58cf00_18114779.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/dcbd92cb3823382183baeafa632e1c05_36462330.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/744997c385a41b3554cc9c98e0be4c88_50093615.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/8a6cd1524ac492b732d22b47aea1305d_31703913.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/101d1c1a4ddb53208cfc845ddf787c4f_41828095.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/4f8cbd09239a16b51e5b0e3fedad1da1_48888286.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/375634524259d2cae78b8e51fea62d85_75377521.png change filename to text .imagette261276531755819182/ imagette261276531755819182/1755818127_487100_1378371485_84cc69459e180f5e686526668b891ffe_rle_crop_3924086249_0.png.png imagette261276531755819182/1755817584_465064_1378372525_01d9a41ca6bdfea90217fc40c9ee7e6d_rle_crop_3924067845_0.png.png imagette261276531755819182/1755818727_508708_1378370674_dc1bf349cd46c750cd70aee35aa0e82f_rle_crop_3924104810_0.png.png imagette261276531755819182/1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094852_0.png.png imagette261276531755819182/1755818606_505243_1378371049_78c23e151c60a953ade2a6b20a55bc00_rle_crop_3924101172_0.png.png imagette261276531755819182/1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094860_0.png.png imagette261276531755819182/1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075996_0.png.png imagette261276531755819182/1755817527_461460_1378372729_0c8f495bfe1e578252080753977043bc_rle_crop_3924067383_0.png.png imagette261276531755819182/1755817047_441823_1378371261_f5e9b861d749838b18100531e72f3948_rle_crop_3924051452_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/25a5e6d1e50fd2a4ea3c7f5cd1dd2138_93563418.png imagette261276531755819182 26127662 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=26127662 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378375468: '1755817765_473396_1378372560_7d507b4bcd46be6953d0335c3adb4922_rle_crop_3924075977_0.png', 1378379446: '1755818727_508708_1378370674_dc1bf349cd46c750cd70aee35aa0e82f_rle_crop_3924104811_0.png', 1378378956: '1755818606_505243_1378371033_cc2f2b6528e882e1db8b569426d3789a_rle_crop_3924101212_0.png', 1378377885: '1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094859_0.png', 1378377883: '1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094781_0.png', 1378377882: '1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094783_0.png', 1378376815: '1755818127_487100_1378371487_5ecfaa8cc30528c7ca2badbfcc16c3bb_rle_crop_3924086236_0.png', 1378376814: '1755818127_487100_1378371892_a657833ba0460b95797499d3f3c9920a_rle_crop_3924086213_0.png', 1378376243: '1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079828_0.png', 1378376225: '1755817947_478874_1378371784_dfc7ebb017d09a5f6f142da12eb6afb2_rle_crop_3924080983_0.png', 1378376224: '1755817947_478874_1378371813_d57145e6242dbeaa73cb16c621c3c83e_rle_crop_3924080970_0.png', 1378376223: '1755817947_478874_1378371840_3227c183ddf13412ad0627a4b1cddfb8_rle_crop_3924080961_0.png', 1378376222: '1755817947_478874_1378371865_04cb16f29969d81fd5b933874e51f281_rle_crop_3924080946_0.png', 1378375472: '1755817765_473396_1378372278_047d668cec420ab81ffbcb3272609546_rle_crop_3924076010_0.png', 1378375470: '1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075997_0.png', 1378372620: '1755817047_441823_1378371279_6ba375bd5710d39e1e8c3541ebff51d9_rle_crop_3924051439_0.png', 1378375259: '1755817645_467859_1378372128_cdd83aa78ce99faa9a89cf806750e6e8_rle_crop_3924072753_0.png', 1378375258: '1755817645_467859_1378372129_dce09b0b00856bde9f2619ee9a58fec0_rle_crop_3924072595_0.png', 1378375257: '1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072480_0.png', 1378375256: '1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072479_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/86eef9ff02b7c8c7f4a9dde6990a56b7_37309795.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/36e1e3d7554dd3adcddbd3269c835dfb_47545739.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/59bef30b10e654c679ce7ce4b5f354c0_13530650.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/713593cc8172ab6b806b95bf36fc7dfd_72234554.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/3cdbb2ab1205d325fff3d1dac91af7b5_88909791.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/4ae23b96d4a93cbc83ed150bdc0114d8_79197246.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/2967252c9a48a487f8a5072b4d59af06_14153797.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/0fc863a3e949055460eef499687085d2_86654367.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/67135a0b41710f28757c1fb7d08289fe_41738222.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/98c48b9455c81d263b900b36c05ebc13_93098305.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/8415566556593a6fa232bada6dcf696e_52226610.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/07c2bc69e6e0d7258ba862c060c95358_31489150.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/372052f1fcdf735dc3e130f5327e0eaf_69211024.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/93e4674119d580d084eed453758da2e7_54206160.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1a7251edb58332fff5cb369a9468daee_88539121.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/a1a3ab2a581729ce9e5594dac39a8b4e_42705040.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/fe2f9d3f6bd3c01539e4316d56345090_92118006.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/fe2f9d3f6bd3c01539e4316d56345090_75811968.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/cc0aa0d06856967ef50599f278ab999c_78781457.png change filename to text .imagette261276621755819183/ imagette261276621755819183/1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094783_0.png.png imagette261276621755819183/1755818127_487100_1378371892_a657833ba0460b95797499d3f3c9920a_rle_crop_3924086213_0.png.png imagette261276621755819183/1755817765_473396_1378372560_7d507b4bcd46be6953d0335c3adb4922_rle_crop_3924075977_0.png.png imagette261276621755819183/1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075997_0.png.png imagette261276621755819183/1755817947_478874_1378371784_dfc7ebb017d09a5f6f142da12eb6afb2_rle_crop_3924080983_0.png.png imagette261276621755819183/1755818364_496121_1378371095_25c3cb573ed609ae4458a3a8b3d0eb47_rle_crop_3924094859_0.png.png imagette261276621755819183/1755817645_467859_1378372128_cdd83aa78ce99faa9a89cf806750e6e8_rle_crop_3924072753_0.png.png imagette261276621755819183/1755818127_487100_1378371487_5ecfaa8cc30528c7ca2badbfcc16c3bb_rle_crop_3924086236_0.png.png imagette261276621755819183/1755817947_478874_1378371813_d57145e6242dbeaa73cb16c621c3c83e_rle_crop_3924080970_0.png.png imagette261276621755819183/1755818606_505243_1378371033_cc2f2b6528e882e1db8b569426d3789a_rle_crop_3924101212_0.png.png imagette261276621755819183/1755818727_508708_1378370674_dc1bf349cd46c750cd70aee35aa0e82f_rle_crop_3924104811_0.png.png imagette261276621755819183/1755817765_473396_1378372278_047d668cec420ab81ffbcb3272609546_rle_crop_3924076010_0.png.png imagette261276621755819183/1755818364_496121_1378371144_61f7cf5df1c892bc8c3eb5aa11ac7de2_rle_crop_3924094781_0.png.png imagette261276621755819183/1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072479_0.png.png imagette261276621755819183/1755817645_467859_1378372337_7da1c7096a8bc0c9a386da9882cb8f29_rle_crop_3924072480_0.png.png imagette261276621755819183/1755817047_441823_1378371279_6ba375bd5710d39e1e8c3541ebff51d9_rle_crop_3924051439_0.png.png imagette261276621755819183/1755817947_478874_1378371865_04cb16f29969d81fd5b933874e51f281_rle_crop_3924080946_0.png.png imagette261276621755819183/1755818007_482178_1378372048_3c8b4e88271aa0da5ddb032090a8273f_rle_crop_3924079828_0.png.png imagette261276621755819183/1755817645_467859_1378372129_dce09b0b00856bde9f2619ee9a58fec0_rle_crop_3924072595_0.png.png imagette261276621755819183/1755817947_478874_1378371840_3227c183ddf13412ad0627a4b1cddfb8_rle_crop_3924080961_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/4fa169469fd91734a795884c1a87ac71_58123430.png imagette261276621755819183 26127665 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=26127665 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1378372632: '1755817047_441823_1378371261_f5e9b861d749838b18100531e72f3948_rle_crop_3924051451_0.png', 1378373660: '1755817406_454921_1378372665_3df47f8f7ade1aafe8606a38b6387e3b_rle_crop_3924062682_0.png', 1378375498: '1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075994_0.png', 1378379481: '1755818727_508708_1378371073_3e4fecc22bc3eb7285ecb1caa8f88326_rle_crop_3924104802_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1bd02e7b6502c14dbedbbc9372f7a27d_47142822.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/d9481e6c834f2c47d8fe3325731e6c61_18575359.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/1960f7e43e04b003792eed7190402139_56271337.png change filename to text .imagette261276651755819184/ imagette261276651755819184/1755817406_454921_1378372665_3df47f8f7ade1aafe8606a38b6387e3b_rle_crop_3924062682_0.png.png imagette261276651755819184/1755817047_441823_1378371261_f5e9b861d749838b18100531e72f3948_rle_crop_3924051451_0.png.png imagette261276651755819184/1755818727_508708_1378371073_3e4fecc22bc3eb7285ecb1caa8f88326_rle_crop_3924104802_0.png.png imagette261276651755819184/1755817765_473396_1378372306_450c632c0a83b4febbeb46f0a5e3bd2f_rle_crop_3924075994_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/a3e4b02bc154ba881a60e6e6b285621f_72881316.png imagette261276651755819184 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26127621 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/26127676,26127677,26127678,26127679,26127680,26127681,26127682,26127683,26127684,26127685,26127686,26127687?tags=flou,Carton_gris,plastique,papier,autre_refus,Teint_Dans_La_Masse,Carton_brun,environnement,mal_croppe,metal,kraft,cartonnette your option no_mail is active, we will not send the real mail to your client args[1378380373] : ('0.05724743282693976',) no score found for photo 1378380373 We are sending mail with results at report@fotonower.com refus_total : 0.05724743282693976 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=26127621 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_P26127621_22-08-2025_01_33_00.pdf results_Auto_P26127621_22-08-2025_01_33_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26127621_22-08-2025_01_33_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26127621','results_Auto_P26127621_22-08-2025_01_33_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26127621_22-08-2025_01_33_00.pdf','pdf','','0.25','0.05724743282693976') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26127621]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1378380373] map_info['map_portfolio_photo'] : {26127621: [1378380373, 1378372739, 1378372736, 1378372733, 1378372729, 1378372673, 1378372670, 1378372668, 1378372665, 1378372560, 1378372532, 1378372525, 1378372522, 1378372518, 1378372337, 1378372306, 1378372278, 1378372137, 1378372136, 1378372133, 1378372132, 1378372129, 1378372128, 1378372081, 1378372054, 1378372048, 1378372045, 1378372042, 1378371892, 1378371865, 1378371840, 1378371813, 1378371784, 1378371492, 1378371490, 1378371487, 1378371485, 1378371483, 1378371442, 1378371439, 1378371436, 1378371281, 1378371279, 1378371261, 1378371239, 1378371144, 1378371141, 1378371134, 1378371103, 1378371099, 1378371095, 1378371092, 1378371090, 1378371073, 1378371049, 1378371033, 1378370993, 1378370674, 1378370671]} final : False mtd_id 4302 list_pids : [1378380373] 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, '3570026') ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026') 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', '26127621', '1378380373', None, None, None, None, None, '3570026')] time used for this insertion : 0.021779537200927734 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.110834121704102 time spend to save output : 0.02194380760192871 total time spend for step 4 : 5.13277792930603 step5:split_time_score Fri Aug 22 01:33: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 : ['26127621'] 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 : [('26127621',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26127621) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1378380373: {'path': 'temp/1755819180_1753961_1378380373_7cd29a6751639d1e74435be918a74675.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 = 26127621; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26127621 group by h (('00', 59),) 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=26127621 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 (26127621) 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 (26127621) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 22082025 26127621 Nombre de photos uploadées : 59 / 23040 (0%) 22082025 26127621 Nombre de photos taguées (types de déchets): 0 / 59 (0%) 22082025 26127621 Nombre de photos taguées (volume) : 0 / 59 (0%) [{'photo_id': 1378370674, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/dc1bf349cd46c750cd70aee35aa0e82f.jpg', 'username': None, 'uploaded_at': 1755816397, 'text': 'image_22082025_00_45_04_010140m0.jpg 1e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1378370671, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/91adea1e52cc430dda9dd574b2282469.jpg', 'username': None, 'uploaded_at': 1755816397, 'text': 'image_22082025_00_45_13_009128m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1378371073, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/3e4fecc22bc3eb7285ecb1caa8f88326.jpg', 'username': None, 'uploaded_at': 1755816463, 'text': 'image_22082025_00_45_54_010133m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1378371049, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/22/78c23e151c60a953ade2a6b20a55bc00.jpg', 'username': None, 'uploaded_at': 1755816463, 'text': 'image_22082025_00_46_14_010134m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ??????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0026443004608154297 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26127621, '2025-08-22' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-22' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2155069,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21997833251953125 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= 2155069 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2155069, 'dashboard_run_id': 2162675, 'mtr_portfolio_id': 26126087, 'dashboard_result_id': 14163413, '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_P26126087_22-08-2025_00_16_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26126089, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126090, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126091, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126092, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126093, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126095, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126097, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126098, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126099, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126100, 'pht': 3726}}"}, {'dashboat_entry_day': 2155069, 'dashboard_run_id': 2162675, 'mtr_portfolio_id': 26126514, 'dashboard_result_id': 14163414, '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_P26126514_22-08-2025_00_33_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126556, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126559, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126561, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126563, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126564, 'pht': 3726}}"}, {'dashboat_entry_day': 2155069, 'dashboard_run_id': 2162675, 'mtr_portfolio_id': 26126953, 'dashboard_result_id': 14163415, '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_P26126953_22-08-2025_00_49_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26126958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126959, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126967, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126968, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126969, 'pht': 3726}}"}, {'dashboat_entry_day': 2155069, 'dashboard_run_id': 2162675, 'mtr_portfolio_id': 26127621, 'dashboard_result_id': 14163416, '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_P26127621_22-08-2025_01_01_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26127652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26127653, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26127656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26127658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26127660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26127662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26127665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26127667, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26127669, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26127671, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26127674, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26127675, 'pht': 3726}}"}, {'dashboat_entry_day': 2155069, 'dashboard_run_id': 2162675, 'mtr_portfolio_id': 26128250, 'dashboard_result_id': 14163417, '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_P26128250_22-08-2025_01_07_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26128280, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26128281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26128282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26128283, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26128284, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26128285, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26128286, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26128287, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26128288, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26128289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26128290, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26128291, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26126087 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': 3569739, 'mtr_portfolio_id': 26126087, 'created_at': datetime.datetime(2025, 8, 22, 0, 16, 58), 'result': '0.01332419071179773', 'result_long': None, 'result_double': None}] Qualite : 0.01332419071179773 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26126087 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126087_22-08-2025_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26126087 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_P26126087_22-08-2025_00_16_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26126089, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126090, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126091, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126092, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126093, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126095, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126097, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126098, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126099, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126100, 'pht': 3726}}" where mtr_portfolio_id = 26126087 and dashboard_run_id = 2162675 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`=26126087 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14163413, 0.01332419071179773, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126087_22-08-2025_00_16_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26126089, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126090, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126091, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126092, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126093, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126095, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126097, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126098, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126099, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126100, '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 = 26126514 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': 3569869, 'mtr_portfolio_id': 26126514, 'created_at': datetime.datetime(2025, 8, 22, 0, 33, 32), 'result': '0.053795416167792945', 'result_long': None, 'result_double': None}] Qualite : 0.053795416167792945 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26126514 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126514_22-08-2025_00_33_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26126514 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_P26126514_22-08-2025_00_33_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126556, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126559, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126561, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126563, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126564, 'pht': 3726}}" where mtr_portfolio_id = 26126514 and dashboard_run_id = 2162675 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`=26126514 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14163414, 0.053795416167792945, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126514_22-08-2025_00_33_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26126552, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126556, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126559, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126561, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126563, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126564, '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 = 26126953 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': 3569918, 'mtr_portfolio_id': 26126953, 'created_at': datetime.datetime(2025, 8, 22, 0, 49), 'result': '0.07672007176782777', 'result_long': None, 'result_double': None}] Qualite : 0.07672007176782777 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26126953 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126953_22-08-2025_00_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26126953 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_P26126953_22-08-2025_00_49_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26126958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126959, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126967, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126968, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126969, 'pht': 3726}}" where mtr_portfolio_id = 26126953 and dashboard_run_id = 2162675 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`=26126953 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14163415, 0.07672007176782777, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26126953_22-08-2025_00_49_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26126958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26126959, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26126960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26126961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26126962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26126963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26126964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26126965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26126966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26126967, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26126968, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26126969, '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 = 26127621 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': 3570026, 'mtr_portfolio_id': 26127621, 'created_at': datetime.datetime(2025, 8, 22, 1, 33), 'result': '0.05724743282693976', 'result_long': None, 'result_double': None}] Qualite : 0.05724743282693976 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26127621 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26127621_22-08-2025_01_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26127621 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_P26127621_22-08-2025_01_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26127652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26127653, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26127656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26127658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26127660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26127662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26127665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26127667, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26127669, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26127671, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26127674, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26127675, 'pht': 3726}}" where mtr_portfolio_id = 26127621 and dashboard_run_id = 2162678 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`=26127621 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14163416, 0.05724743282693976, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26127621_22-08-2025_01_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26127652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26127653, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26127656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26127658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26127660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26127662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26127665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26127667, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26127669, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26127671, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26127674, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26127675, '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 = 26128250 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 = 26128250 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 26128250 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26128250 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26128250 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26128250 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26128250_22-08-2025_01_07_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26128250 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_P26128250_22-08-2025_01_07_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26128280, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26128281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26128282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26128283, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26128284, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26128285, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26128286, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26128287, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26128288, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26128289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26128290, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26128291, 'pht': 3726}}" where mtr_portfolio_id = 26128250 and dashboard_run_id = 2162678 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26126087,26126514,26126953,26127621,26128250) result : ((1378358095,), (1378358098,), (1378358099,), (1378358102,), (1378358105,), (1378358108,), (1378358111,), (1378358114,), (1378358117,), (1378358141,), (1378358143,), (1378358145,), (1378358148,), (1378358177,), (1378358180,), (1378358183,), (1378358185,), (1378358186,), (1378358219,), (1378358220,), (1378358223,), (1378358224,), (1378358227,), (1378358228,), (1378358232,), (1378358233,), (1378358238,), (1378358239,), (1378358241,), (1378358243,), (1378358251,), (1378358253,), (1378358255,), (1378358258,), (1378358289,), (1378358291,), (1378358294,), (1378358297,), (1378358300,), (1378358330,), (1378358331,), (1378358334,), (1378358335,), (1378358336,), (1378358337,), (1378358340,), (1378358341,), (1378358343,), (1378358344,), (1378358368,), (1378358371,), (1378358375,), (1378358379,), (1378358404,), (1378358407,), (1378358409,), (1378358424,), (1378358429,), (1378358432,), (1378358435,), (1378358438,), (1378358441,), (1378358445,), (1378358449,), (1378358470,), (1378358473,), (1378358477,), (1378358503,), (1378358507,), (1378358511,), (1378358514,), (1378358516,), (1378358538,), (1378358540,), (1378358542,), (1378358544,), (1378358570,), (1378358603,), (1378360256,), (1378361915,), (1378361986,), (1378362977,), (1378363050,), (1378363139,), (1378363167,), (1378363284,), (1378363292,), (1378363294,), (1378363757,), (1378363806,), (1378363855,), (1378364350,), (1378364351,), (1378364376,), (1378364385,), (1378364420,), (1378364428,), (1378364444,), (1378364445,), (1378364565,), (1378364566,), (1378364575,), (1378364577,), (1378364579,), (1378364580,), (1378364703,), (1378364704,), (1378364749,), (1378364755,), (1378364782,), (1378364786,), (1378365030,), (1378365031,), (1378365052,), (1378365054,), (1378365074,), (1378365075,), (1378365078,), (1378365079,), (1378365082,), (1378365083,), (1378365426,), (1378365450,), (1378365479,), (1378365506,), (1378365541,), (1378365554,), (1378365556,), (1378365576,), (1378365649,), (1378365651,), (1378365653,), (1378365882,), (1378365777,), (1378365844,), (1378366120,), (1378366153,), (1378366224,), (1378366255,), (1378366291,), (1378366295,), (1378366636,), (1378366659,), (1378366686,), (1378366698,), (1378366811,), (1378366814,), (1378366816,), (1378366818,), (1378366820,), (1378366844,), (1378366845,), (1378366847,), (1378366848,), (1378366850,), (1378366851,), (1378366853,), (1378366854,), (1378367134,), (1378367135,), (1378367150,), (1378367151,), (1378367154,), (1378367155,), (1378367163,), (1378367167,), (1378367181,), (1378367184,), (1378367201,), (1378367202,), (1378367208,), (1378367258,), (1378367315,), (1378367366,), (1378367416,), (1378367705,), (1378367758,), (1378368592,), (1378368594,), (1378368629,), (1378368649,), (1378368676,), (1378368853,), (1378368856,), (1378368858,), (1378368861,), (1378368865,), (1378368867,), (1378369127,), (1378369139,), (1378369143,), (1378369371,), (1378369374,), (1378369643,), (1378369670,), (1378369698,), (1378369724,), (1378369751,), (1378369949,), (1378369972,), (1378370017,), (1378370046,), (1378370342,), (1378370343,), (1378370388,), (1378370391,), (1378370419,), (1378370424,), (1378370437,), (1378370438,), (1378370446,), (1378370453,), (1378370684,), (1378370671,), (1378370674,), (1378370993,), (1378371033,), (1378371049,), (1378371073,), (1378371090,), (1378371092,), (1378371095,), (1378371099,), (1378371103,), (1378371134,), (1378371141,), (1378371144,), (1378371239,), (1378371261,), (1378371279,), (1378371281,), (1378371436,), (1378371439,), (1378371442,), (1378371483,), (1378371485,), (1378371487,), (1378371490,), (1378371492,), (1378371784,), (1378371813,), (1378371840,), (1378371865,), (1378371892,), (1378372042,), (1378372045,), (1378372048,), (1378372054,), (1378372081,), (1378372128,), (1378372129,), (1378372132,), (1378372133,), (1378372136,), (1378372137,), (1378372278,), (1378372306,), (1378372337,), (1378372518,), (1378372522,), (1378372525,), (1378372532,), (1378372560,), (1378372665,), (1378372668,), (1378372670,), (1378372673,), (1378372729,), (1378372733,), (1378372736,), (1378372739,), (1378380373,), (1378374040,), (1378374042,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'22082025': {'nb_upload': 59, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26127621]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1378380373] map_info['map_portfolio_photo'] : {26127621: [1378380373, 1378372739, 1378372736, 1378372733, 1378372729, 1378372673, 1378372670, 1378372668, 1378372665, 1378372560, 1378372532, 1378372525, 1378372522, 1378372518, 1378372337, 1378372306, 1378372278, 1378372137, 1378372136, 1378372133, 1378372132, 1378372129, 1378372128, 1378372081, 1378372054, 1378372048, 1378372045, 1378372042, 1378371892, 1378371865, 1378371840, 1378371813, 1378371784, 1378371492, 1378371490, 1378371487, 1378371485, 1378371483, 1378371442, 1378371439, 1378371436, 1378371281, 1378371279, 1378371261, 1378371239, 1378371144, 1378371141, 1378371134, 1378371103, 1378371099, 1378371095, 1378371092, 1378371090, 1378371073, 1378371049, 1378371033, 1378370993, 1378370674, 1378370671]} final : True mtd_id 4302 list_pids : [1378380373] Looping around the photos to save general results len do output : 1 /26127621Didn'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, '3570026') ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026') 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, '26127621', 'None', None, None, None, None, '3570026'), ('4302', '26127621', '1378380373', None, None, None, None, None, '3570026')] time used for this insertion : 0.04812026023864746 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8512678146362305 time spend to save output : 0.048284053802490234 total time spend for step 5 : 0.8995518684387207 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 (3570026) 1.87user 1.97system 0:11.72elapsed 32%CPU (0avgtext+0avgdata 156160maxresident)k 296inputs+10704outputs (12major+63259minor)pagefaults 0swaps