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 : 1752358 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 (3322460) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3322460) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198343 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3322460'] with mtr_portfolio_ids : ['25198343'] and first list_photo_ids : [] new path : /proc/1752358/ Name: python3 Umask: 0002 State: R (running) Tgid: 1752358 Ngid: 0 Pid: 1752358 PPid: 1752357 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1752358 NSpid: 1752358 NSpgid: 1750788 NSsid: 1750788 VmPeak: 1106896 kB VmSize: 1106896 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100048 kB VmRSS: 100048 kB RssAnon: 59820 kB RssFile: 40228 kB RssShmem: 0 kB VmData: 865648 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1752358', 'Ngid': '0', 'Pid': '1752358', 'PPid': '1752357', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1752358', 'NSpid': '1752358', 'NSpgid': '1750788', 'NSsid': '1750788', 'VmPeak': '1106896 kB', 'VmSize': '1106896 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100048 kB', 'VmRSS': '100048 kB', 'RssAnon': '59820 kB', 'RssFile': '40228 kB', 'RssShmem': '0 kB', 'VmData': '865648 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '1752358', '1106896', '0', '1106896', '865648', '100048', b'', 'marlene', '3322460') 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 (25198343) 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 (3322460 ) ) 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 (25198343) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1373227853, 'portfolio_id': 25198343}, {'photo_id': 1373227806, 'portfolio_id': 25198343}, {'photo_id': 1373227783, 'portfolio_id': 25198343}, {'photo_id': 1373227757, 'portfolio_id': 25198343}, {'photo_id': 1373227730, 'portfolio_id': 25198343}, {'photo_id': 1373227698, 'portfolio_id': 25198343}, {'photo_id': 1373227481, 'portfolio_id': 25198343}, {'photo_id': 1373227448, 'portfolio_id': 25198343}, {'photo_id': 1373227371, 'portfolio_id': 25198343}, {'photo_id': 1373227340, 'portfolio_id': 25198343}, {'photo_id': 1373227317, 'portfolio_id': 25198343}, {'photo_id': 1373227293, 'portfolio_id': 25198343}, {'photo_id': 1373226763, 'portfolio_id': 25198343}, {'photo_id': 1373226707, 'portfolio_id': 25198343}, {'photo_id': 1373226660, 'portfolio_id': 25198343}, {'photo_id': 1373226612, 'portfolio_id': 25198343}, {'photo_id': 1373226564, 'portfolio_id': 25198343}, {'photo_id': 1373226504, 'portfolio_id': 25198343}, {'photo_id': 1373226268, 'portfolio_id': 25198343}, {'photo_id': 1373226265, 'portfolio_id': 25198343}, {'photo_id': 1373226264, 'portfolio_id': 25198343}, {'photo_id': 1373226263, 'portfolio_id': 25198343}, {'photo_id': 1373226260, 'portfolio_id': 25198343}, {'photo_id': 1373226258, 'portfolio_id': 25198343}, {'photo_id': 1373226091, 'portfolio_id': 25198343}, {'photo_id': 1373225566, 'portfolio_id': 25198343}, {'photo_id': 1373225436, 'portfolio_id': 25198343}, {'photo_id': 1373225386, 'portfolio_id': 25198343}, {'photo_id': 1373225333, 'portfolio_id': 25198343}, {'photo_id': 1373225282, 'portfolio_id': 25198343}, {'photo_id': 1373225228, 'portfolio_id': 25198343}, {'photo_id': 1373224814, 'portfolio_id': 25198343}, {'photo_id': 1373224765, 'portfolio_id': 25198343}, {'photo_id': 1373224717, 'portfolio_id': 25198343}, {'photo_id': 1373224666, 'portfolio_id': 25198343}, {'photo_id': 1373224611, 'portfolio_id': 25198343}, {'photo_id': 1373224558, 'portfolio_id': 25198343}, {'photo_id': 1373223875, 'portfolio_id': 25198343}, {'photo_id': 1373223828, 'portfolio_id': 25198343}, {'photo_id': 1373223779, 'portfolio_id': 25198343}, {'photo_id': 1373223720, 'portfolio_id': 25198343}, {'photo_id': 1373223642, 'portfolio_id': 25198343}, {'photo_id': 1373223563, 'portfolio_id': 25198343}, {'photo_id': 1373223273, 'portfolio_id': 25198343}, {'photo_id': 1373223270, 'portfolio_id': 25198343}, {'photo_id': 1373223268, 'portfolio_id': 25198343}, {'photo_id': 1373223267, 'portfolio_id': 25198343}, {'photo_id': 1373223265, 'portfolio_id': 25198343}, {'photo_id': 1373223263, 'portfolio_id': 25198343}, {'photo_id': 1373223032, 'portfolio_id': 25198343}, {'photo_id': 1373223006, 'portfolio_id': 25198343}, {'photo_id': 1373222982, 'portfolio_id': 25198343}, {'photo_id': 1373222955, 'portfolio_id': 25198343}, {'photo_id': 1373222926, 'portfolio_id': 25198343}, {'photo_id': 1373222898, 'portfolio_id': 25198343}, {'photo_id': 1373222621, 'portfolio_id': 25198343}, {'photo_id': 1373222586, 'portfolio_id': 25198343}, {'photo_id': 1373222555, 'portfolio_id': 25198343}, {'photo_id': 1373222526, 'portfolio_id': 25198343}, {'photo_id': 1373222498, 'portfolio_id': 25198343}, {'photo_id': 1373222469, 'portfolio_id': 25198343}, {'photo_id': 1373222388, 'portfolio_id': 25198343}, {'photo_id': 1373222386, 'portfolio_id': 25198343}, {'photo_id': 1373222384, 'portfolio_id': 25198343}, {'photo_id': 1373222382, 'portfolio_id': 25198343}, {'photo_id': 1373222379, 'portfolio_id': 25198343}, {'photo_id': 1373222376, 'portfolio_id': 25198343}, {'photo_id': 1373222355, 'portfolio_id': 25198343}, {'photo_id': 1373222354, 'portfolio_id': 25198343}, {'photo_id': 1373222352, 'portfolio_id': 25198343}, {'photo_id': 1373222349, 'portfolio_id': 25198343}, {'photo_id': 1373222346, 'portfolio_id': 25198343}, {'photo_id': 1373222336, 'portfolio_id': 25198343}, {'photo_id': 1373222306, 'portfolio_id': 25198343}, {'photo_id': 1373222304, 'portfolio_id': 25198343}, {'photo_id': 1373222302, 'portfolio_id': 25198343}, {'photo_id': 1373222299, 'portfolio_id': 25198343}, {'photo_id': 1373222296, 'portfolio_id': 25198343}, {'photo_id': 1373222292, 'portfolio_id': 25198343}, {'photo_id': 1373222271, 'portfolio_id': 25198343}, {'photo_id': 1373222269, 'portfolio_id': 25198343}, {'photo_id': 1373222266, 'portfolio_id': 25198343}, {'photo_id': 1373222263, 'portfolio_id': 25198343}, {'photo_id': 1373222259, 'portfolio_id': 25198343}, {'photo_id': 1373222256, 'portfolio_id': 25198343}] map_portfolio_id_photo_id: {25198343: [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293, 1373226763, 1373226707, 1373226660, 1373226612, 1373226564, 1373226504, 1373226268, 1373226265, 1373226264, 1373226263, 1373226260, 1373226258, 1373226091, 1373225566, 1373225436, 1373225386, 1373225333, 1373225282, 1373225228, 1373224814, 1373224765, 1373224717, 1373224666, 1373224611, 1373224558, 1373223875, 1373223828, 1373223779, 1373223720, 1373223642, 1373223563, 1373223273, 1373223270, 1373223268, 1373223267, 1373223265, 1373223263, 1373223032, 1373223006, 1373222982, 1373222955, 1373222926, 1373222898, 1373222621, 1373222586, 1373222555, 1373222526, 1373222498, 1373222469, 1373222388, 1373222386, 1373222384, 1373222382, 1373222379, 1373222376, 1373222355, 1373222354, 1373222352, 1373222349, 1373222346, 1373222336, 1373222306, 1373222304, 1373222302, 1373222299, 1373222296, 1373222292, 1373222271, 1373222269, 1373222266, 1373222263, 1373222259, 1373222256]} ##### 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.015819549560546875 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 23 01:30: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 (25198343) 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 : 25198343 get user id for portfolio 25198343 get sub ptf for main ptf 25198343, type 3726 and hashtags ['flou', 'kraft', 'autre_refus', 'Teint_Dans_La_Masse', 'cartonnette', 'mal_croppe', 'Carton_brun', 'papier', 'plastique', 'metal', 'environnement', '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`=25198343 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','Teint_Dans_La_Masse','cartonnette','mal_croppe','Carton_brun','papier','plastique','metal','environnement','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`=25198343 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','Teint_Dans_La_Masse','cartonnette','mal_croppe','Carton_brun','papier','plastique','metal','environnement','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 25198343, 'sub_port_id': 25198348, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996388, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'papier': {'main_port_id': 25198343, 'sub_port_id': 25198349, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996389, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'flou': {'main_port_id': 25198343, 'sub_port_id': 25198350, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996390, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'mal_croppe': {'main_port_id': 25198343, 'sub_port_id': 25198351, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996391, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'cartonnette': {'main_port_id': 25198343, 'sub_port_id': 25198352, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996392, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'environnement': {'main_port_id': 25198343, 'sub_port_id': 25198353, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996393, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'autre_refus': {'main_port_id': 25198343, 'sub_port_id': 25198354, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996394, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'metal': {'main_port_id': 25198343, 'sub_port_id': 25198355, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996395, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'plastique': {'main_port_id': 25198343, 'sub_port_id': 25198356, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996396, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'Carton_brun': {'main_port_id': 25198343, 'sub_port_id': 25198357, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996397, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 25198343, 'sub_port_id': 25198358, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996398, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}, 'Carton_gris': {'main_port_id': 25198343, 'sub_port_id': 25198359, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996399, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25198348 , 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=25198343 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 (25198348) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198349 , 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=25198343 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 (25198349) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198350 , 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=25198343 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 (25198350) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198351 , 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=25198343 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 (25198351) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198352 , 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=25198343 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 (25198352) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198353 , 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=25198343 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 (25198353) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198354 , 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=25198343 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 (25198354) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198355 , 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=25198343 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 (25198355) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198356 , 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=25198343 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 (25198356) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198357 , 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=25198343 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 (25198357) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198358 , 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=25198343 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 (25198358) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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 25198359 , 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=25198343 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 (25198359) result : ((1373222584,), (1373222587,), (1373222589,), (1373222591,), (1373222593,), (1373224488,), (1373224491,), (1373224495,), (1373225993,), (1373225996,), (1373225999,), (1373226002,), (1373226005,), (1373226474,), (1373226477,), (1373226480,), (1373226483,), (1373227683,), (1373227686,), (1373227688,), (1373227690,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25198343) result : ((1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) 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`=25198343 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','Teint_Dans_La_Masse','cartonnette','mal_croppe','Carton_brun','papier','plastique','metal','environnement','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`=25198343 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','Teint_Dans_La_Masse','cartonnette','mal_croppe','Carton_brun','papier','plastique','metal','environnement','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 25198343, 'sub_port_id': 25198360, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996400, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'papier': {'main_port_id': 25198343, 'sub_port_id': 25198361, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996401, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'flou': {'main_port_id': 25198343, 'sub_port_id': 25198362, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996402, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'mal_croppe': {'main_port_id': 25198343, 'sub_port_id': 25198363, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996403, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'cartonnette': {'main_port_id': 25198343, 'sub_port_id': 25198364, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996404, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'environnement': {'main_port_id': 25198343, 'sub_port_id': 25198365, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996405, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'autre_refus': {'main_port_id': 25198343, 'sub_port_id': 25198366, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996406, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'metal': {'main_port_id': 25198343, 'sub_port_id': 25198367, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996407, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'plastique': {'main_port_id': 25198343, 'sub_port_id': 25198368, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996408, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'Carton_brun': {'main_port_id': 25198343, 'sub_port_id': 25198369, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996409, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 25198343, 'sub_port_id': 25198370, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996410, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}, 'Carton_gris': {'main_port_id': 25198343, 'sub_port_id': 25198371, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16996411, 'last_updated_at': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 1, 28, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 1, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198360,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198348 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198361,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198349 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198362,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198350 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198363,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198351 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198364,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198352 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198365,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198353 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198366,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198354 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198367,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198355 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198368,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198356 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198369,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198357 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198370,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198358 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25198371,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25198359 lien utilise dans velours : https://www.fotonower.com/velours/25198360,25198361,25198362,25198363,25198364,25198365,25198366,25198367,25198368,25198369,25198370,25198371?tags=kraft,papier,flou,mal_croppe,cartonnette,environnement,autre_refus,metal,plastique,Carton_brun,Teint_Dans_La_Masse,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25198343]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] map_info['map_portfolio_photo'] : {25198343: [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293, 1373226763, 1373226707, 1373226660, 1373226612, 1373226564, 1373226504, 1373226268, 1373226265, 1373226264, 1373226263, 1373226260, 1373226258, 1373226091, 1373225566, 1373225436, 1373225386, 1373225333, 1373225282, 1373225228, 1373224814, 1373224765, 1373224717, 1373224666, 1373224611, 1373224558, 1373223875, 1373223828, 1373223779, 1373223720, 1373223642, 1373223563, 1373223273, 1373223270, 1373223268, 1373223267, 1373223265, 1373223263, 1373223032, 1373223006, 1373222982, 1373222955, 1373222926, 1373222898, 1373222621, 1373222586, 1373222555, 1373222526, 1373222498, 1373222469, 1373222388, 1373222386, 1373222384, 1373222382, 1373222379, 1373222376, 1373222355, 1373222354, 1373222352, 1373222349, 1373222346, 1373222336, 1373222306, 1373222304, 1373222302, 1373222299, 1373222296, 1373222292, 1373222271, 1373222269, 1373222266, 1373222263, 1373222259, 1373222256]} final : False mtd_id 4302 list_pids : [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] Looping around the photos to save general results len do output : 1 /25198343. 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, '3322460') ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25198343', "{'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359}", None, None, None, None, '3322460'), ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460')] time used for this insertion : 0.013769388198852539 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5084834098815918 time spend to save output : 0.01421666145324707 total time spend for step 1 : 1.5227000713348389 step2:final Wed Jul 23 01:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25198343) 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 25198343 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1373222271,1373222269,1373222266,1373222263,1373222259,1373222256,1373222306,1373222304,1373222302,1373222299,1373222296,1373222292,1373222355,1373222354,1373222352,1373222349,1373222346,1373222336,1373222388,1373222386,1373222384,1373222382,1373222379,1373222376,1373222621,1373222586,1373222555,1373222526,1373222498,1373222469,1373223032,1373223006,1373222982,1373222955,1373222926,1373222898,1373223273,1373223270,1373223268,1373223267,1373223265,1373223263,1373223875,1373223828,1373223779,1373223720,1373223642,1373223563,1373224814,1373224765,1373224717,1373224666,1373224611,1373224558,1373225566,1373226091,1373225436,1373225386,1373225333,1373225282,1373225228,1373226268,1373226265,1373226264,1373226263,1373226260,1373226258,1373226763,1373226707,1373226660,1373226612,1373226564,1373226504,1373227481,1373227448,1373227371,1373227340,1373227317,1373227293,1373227853,1373227806,1373227783,1373227757,1373227730,1373227698); 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([25198343]) Inside saveOutput : final : False verbose : True original output for save of step final : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} new output for save of step final : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] map_info['map_portfolio_photo'] : {25198343: [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293, 1373226763, 1373226707, 1373226660, 1373226612, 1373226564, 1373226504, 1373226268, 1373226265, 1373226264, 1373226263, 1373226260, 1373226258, 1373226091, 1373225566, 1373225436, 1373225386, 1373225333, 1373225282, 1373225228, 1373224814, 1373224765, 1373224717, 1373224666, 1373224611, 1373224558, 1373223875, 1373223828, 1373223779, 1373223720, 1373223642, 1373223563, 1373223273, 1373223270, 1373223268, 1373223267, 1373223265, 1373223263, 1373223032, 1373223006, 1373222982, 1373222955, 1373222926, 1373222898, 1373222621, 1373222586, 1373222555, 1373222526, 1373222498, 1373222469, 1373222388, 1373222386, 1373222384, 1373222382, 1373222379, 1373222376, 1373222355, 1373222354, 1373222352, 1373222349, 1373222346, 1373222336, 1373222306, 1373222304, 1373222302, 1373222299, 1373222296, 1373222292, 1373222271, 1373222269, 1373222266, 1373222263, 1373222259, 1373222256]} final : False mtd_id 4302 list_pids : [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] Looping around the photos to save general results len do output : 12 /1373227853.Didn't retrieve data . /1373227806.Didn't retrieve data . /1373227783.Didn't retrieve data . /1373227757.Didn't retrieve data . /1373227730.Didn't retrieve data . /1373227698.Didn't retrieve data . /1373227481.Didn't retrieve data . /1373227448.Didn't retrieve data . /1373227371.Didn't retrieve data . /1373227340.Didn't retrieve data . /1373227317.Didn't retrieve data . /1373227293.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, '3322460') ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25198343', '1373227853', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227806', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227783', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227757', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227730', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227698', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227481', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227448', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227371', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227340', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227317', '0.04089603241072767', None, None, None, None, '3322460'), ('4302', '25198343', '1373227293', '0.04089603241072767', None, None, None, None, '3322460')] time used for this insertion : 0.013197898864746094 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06591153144836426 time spend to save output : 0.01383662223815918 total time spend for step 2 : 0.07974815368652344 step3:velours_tree Wed Jul 23 01:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25198343: [{'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359}]} input_args_next_step : {25198343: ()} output_args : {25198343: [{'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359}]} args : 25198343 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25198343) 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([25198343]) 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.2914581298828125 time spend to save output : 6.008148193359375e-05 total time spend for step 3 : 0.2915182113647461 step4:send_mail_cod Wed Jul 23 01:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} input_args_next_step : {1373227853: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227853 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227806 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227783 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227757 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227730 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227698 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227481 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227448 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227371 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227340 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227317 depend.output_id : 0 input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ()} output_args : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',)} args : 1373227293 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {25198343: [{'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359}]} input_args_next_step : {1373227853: ('0.04089603241072767',), 1373227806: ('0.04089603241072767',), 1373227783: ('0.04089603241072767',), 1373227757: ('0.04089603241072767',), 1373227730: ('0.04089603241072767',), 1373227698: ('0.04089603241072767',), 1373227481: ('0.04089603241072767',), 1373227448: ('0.04089603241072767',), 1373227371: ('0.04089603241072767',), 1373227340: ('0.04089603241072767',), 1373227317: ('0.04089603241072767',), 1373227293: ('0.04089603241072767',), 25198343: ()} output_args : {25198343: [{'kraft': 25198348, 'papier': 25198349, 'flou': 25198350, 'mal_croppe': 25198351, 'cartonnette': 25198352, 'environnement': 25198353, 'autre_refus': 25198354, 'metal': 25198355, 'plastique': 25198356, 'Carton_brun': 25198357, 'Teint_Dans_La_Masse': 25198358, 'Carton_gris': 25198359}]} args : 25198343 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.04089603241072767',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25198343) 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 (1373227853,1373227806,1373227783,1373227757,1373227730,1373227698,1373227481,1373227448,1373227371,1373227340,1373227317,1373227293) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1373227293 begin to download photo : 1373227371 begin to download photo : 1373227698 begin to download photo : 1373227783 download finish for photo 1373227293 begin to download photo : 1373227317 download finish for photo 1373227783 begin to download photo : 1373227806 download finish for photo 1373227371 begin to download photo : 1373227448 download finish for photo 1373227698 begin to download photo : 1373227730 download finish for photo 1373227448 begin to download photo : 1373227481 download finish for photo 1373227806 begin to download photo : 1373227853 download finish for photo 1373227317 begin to download photo : 1373227340 download finish for photo 1373227730 begin to download photo : 1373227757 download finish for photo 1373227481 download finish for photo 1373227757 download finish for photo 1373227853 download finish for photo 1373227340 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette251983481753227060/ imagette251983501753227060/ imagette251983511753227060/ imagette251983521753227060/ imagette251983541753227060/ imagette251983551753227060/ imagette251983561753227060/ imagette251983571753227060/ imagette251983581753227060/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P25198343_23-07-2025_01_31_00.pdf 25198348 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=25198348 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983481753227060 25198350 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=25198350 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983501753227060 25198351 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=25198351 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983511753227060 25198352 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=25198352 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983521753227060 25198354 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=25198354 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983541753227060 25198355 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=25198355 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983551753227060 25198356 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=25198356 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983561753227060 25198357 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=25198357 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983571753227060 25198358 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=25198358 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251983581753227060 25198359 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=25198359 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1373225999: '1753226725_2667031_1373224717_4360c2dc2b5bd37ba7815c7c9d3133b8_rle_crop_3890474145_0.png', 1373227690: '1753226965_2674126_1373226612_59049c61b99075bb09252828530d133d_rle_crop_3890477247_0.png', 1373227688: '1753226965_2674126_1373226660_034e22d3594f1a2da9247d5cded21645_rle_crop_3890477238_0.png', 1373227686: '1753226965_2674126_1373226707_40af2dd7d645cf16c8b6439b5377b3e2_rle_crop_3890477228_0.png', 1373227683: '1753226965_2674126_1373226763_825d126589cb7c645ca62db09ed2238c_rle_crop_3890477218_0.png', 1373226483: '1753226844_2671310_1373225228_6044812fbded5884d850ece5d72885c6_rle_crop_3890476994_0.png', 1373226480: '1753226844_2671310_1373225386_69d2ccb694d3153dae9e799b69786008_rle_crop_3890476965_0.png', 1373226477: '1753226844_2671310_1373225566_e406eb742de94d137958d531bc9a9642_rle_crop_3890476945_0.png', 1373226474: '1753226844_2671310_1373226091_f556d9fae17b3815ef1886a856734863_rle_crop_3890476935_0.png', 1373226005: '1753226725_2667031_1373224611_1352267e441e54605aac6b958baf56b6_rle_crop_3890474736_0.png', 1373226002: '1753226725_2667031_1373224666_d924329f3b13ea8287faef5e4cc6a8ea_rle_crop_3890474157_0.png', 1373222584: '1753226366_2658659_1373222306_603c8389fe2d1b7795a0fd4267037b0a_rle_crop_3890453411_0.png', 1373225996: '1753226725_2667031_1373224765_4f0719d43827b7d24f600a285ffdb792_rle_crop_3890474136_0.png', 1373225993: '1753226725_2667031_1373224814_02cb3e38ba0558f16fad3aabfa0f86f2_rle_crop_3890472050_0.png', 1373224495: '1753226605_2663869_1373222376_7c484a51095675dc6f6be94f01d84835_rle_crop_3890467699_0.png', 1373224491: '1753226605_2663869_1373222382_384c2886118d0f906f43c5b72857376a_rle_crop_3890467680_0.png', 1373224488: '1753226605_2663869_1373222386_7fe2bb200490080f3a1b62a6fcc22cc5_rle_crop_3890467660_0.png', 1373222593: '1753226366_2658659_1373222292_d16dcf106862bb73d5e371cb2095e573_rle_crop_3890456576_0.png', 1373222591: '1753226366_2658659_1373222296_a3a066ea6797a5408ebf13bb73a9dae6_rle_crop_3890456570_0.png', 1373222589: '1753226366_2658659_1373222299_f7f95ae4d3dfe8601d727aff7356facc_rle_crop_3890455289_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/eb4ca49ca47a7823e3050cd9f118d045_24669055.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/5b4fffbc824ee5191180eba8d8af8a7b_27137459.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/8e2e961bc7dc49ad643be89dd1bdb1ab_38092701.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/416a13a47917b6731a166f9211a6f5d9_63692640.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/00d454db7a02aa47f78a1f400e03e914_33663434.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/f3fbfde394572c0d3dac7c8cf8ae6a7d_9059050.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/9b60c3f0e71b36c63478ba1e8c6a31c2_29929471.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/10826a5c1cc69f0861b2c9274de18dc9_61193796.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/10826a5c1cc69f0861b2c9274de18dc9_44610462.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/769f360624e961b5ba9cb7375d31ea52_55907295.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/e198d98dc5aefe4e207fd828b7aad6e0_77323463.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/6f4ba428c8f3228523f7997bde9a3989_84764154.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/b4c3b456ce1cb7aa3625d19c403b85ba_37296820.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/fe0e65007b12af413bd6a10bdae76ca4_42320476.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/d155783e4fbe0e6fd62599847659c1e1_76547111.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/fdf6dc52b3fed3880c7a7d85f8de5be3_81772699.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/b1ddd11ad1c647cfd08a9d3f4f4ad1b1_57843517.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/0f55e1466155a7e8d2872fcb39ba2d95_97653878.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/8fd4371997e44b9fa56c7da0a0b9225d_96070147.png change filename to text .imagette251983591753227060/ imagette251983591753227060/1753226725_2667031_1373224611_1352267e441e54605aac6b958baf56b6_rle_crop_3890474736_0.png.png imagette251983591753227060/1753226605_2663869_1373222382_384c2886118d0f906f43c5b72857376a_rle_crop_3890467680_0.png.png imagette251983591753227060/1753226844_2671310_1373225566_e406eb742de94d137958d531bc9a9642_rle_crop_3890476945_0.png.png imagette251983591753227060/1753226366_2658659_1373222296_a3a066ea6797a5408ebf13bb73a9dae6_rle_crop_3890456570_0.png.png imagette251983591753227060/1753226965_2674126_1373226707_40af2dd7d645cf16c8b6439b5377b3e2_rle_crop_3890477228_0.png.png imagette251983591753227060/1753226366_2658659_1373222299_f7f95ae4d3dfe8601d727aff7356facc_rle_crop_3890455289_0.png.png imagette251983591753227060/1753226605_2663869_1373222386_7fe2bb200490080f3a1b62a6fcc22cc5_rle_crop_3890467660_0.png.png imagette251983591753227060/1753226844_2671310_1373225386_69d2ccb694d3153dae9e799b69786008_rle_crop_3890476965_0.png.png imagette251983591753227060/1753226366_2658659_1373222292_d16dcf106862bb73d5e371cb2095e573_rle_crop_3890456576_0.png.png imagette251983591753227060/1753226725_2667031_1373224666_d924329f3b13ea8287faef5e4cc6a8ea_rle_crop_3890474157_0.png.png imagette251983591753227060/1753226965_2674126_1373226763_825d126589cb7c645ca62db09ed2238c_rle_crop_3890477218_0.png.png imagette251983591753227060/1753226844_2671310_1373225228_6044812fbded5884d850ece5d72885c6_rle_crop_3890476994_0.png.png imagette251983591753227060/1753226725_2667031_1373224765_4f0719d43827b7d24f600a285ffdb792_rle_crop_3890474136_0.png.png imagette251983591753227060/1753226965_2674126_1373226612_59049c61b99075bb09252828530d133d_rle_crop_3890477247_0.png.png imagette251983591753227060/1753226965_2674126_1373226660_034e22d3594f1a2da9247d5cded21645_rle_crop_3890477238_0.png.png imagette251983591753227060/1753226605_2663869_1373222376_7c484a51095675dc6f6be94f01d84835_rle_crop_3890467699_0.png.png imagette251983591753227060/1753226366_2658659_1373222306_603c8389fe2d1b7795a0fd4267037b0a_rle_crop_3890453411_0.png.png imagette251983591753227060/1753226725_2667031_1373224717_4360c2dc2b5bd37ba7815c7c9d3133b8_rle_crop_3890474145_0.png.png imagette251983591753227060/1753226844_2671310_1373226091_f556d9fae17b3815ef1886a856734863_rle_crop_3890476935_0.png.png imagette251983591753227060/1753226725_2667031_1373224814_02cb3e38ba0558f16fad3aabfa0f86f2_rle_crop_3890472050_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/972825c637b828dd646a142a38a1cc6d_30956528.png imagette251983591753227060 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25198343 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25198360,25198361,25198362,25198363,25198364,25198365,25198366,25198367,25198368,25198369,25198370,25198371?tags=kraft,papier,flou,mal_croppe,cartonnette,environnement,autre_refus,metal,plastique,Carton_brun,Teint_Dans_La_Masse,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1373227853] : ('0.04089603241072767',) no score found for photo 1373227853 We are sending mail with results at report@fotonower.com args[1373227806] : ('0.04089603241072767',) no score found for photo 1373227806 We are sending mail with results at report@fotonower.com args[1373227783] : ('0.04089603241072767',) no score found for photo 1373227783 We are sending mail with results at report@fotonower.com args[1373227757] : ('0.04089603241072767',) no score found for photo 1373227757 We are sending mail with results at report@fotonower.com args[1373227730] : ('0.04089603241072767',) no score found for photo 1373227730 We are sending mail with results at report@fotonower.com args[1373227698] : ('0.04089603241072767',) no score found for photo 1373227698 We are sending mail with results at report@fotonower.com args[1373227481] : ('0.04089603241072767',) no score found for photo 1373227481 We are sending mail with results at report@fotonower.com args[1373227448] : ('0.04089603241072767',) no score found for photo 1373227448 We are sending mail with results at report@fotonower.com args[1373227371] : ('0.04089603241072767',) no score found for photo 1373227371 We are sending mail with results at report@fotonower.com args[1373227340] : ('0.04089603241072767',) no score found for photo 1373227340 We are sending mail with results at report@fotonower.com args[1373227317] : ('0.04089603241072767',) no score found for photo 1373227317 We are sending mail with results at report@fotonower.com args[1373227293] : ('0.04089603241072767',) no score found for photo 1373227293 We are sending mail with results at report@fotonower.com refus_total : 0.04089603241072767 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=25198343 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_P25198343_23-07-2025_01_31_00.pdf results_Auto_P25198343_23-07-2025_01_31_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25198343_23-07-2025_01_31_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','25198343','results_Auto_P25198343_23-07-2025_01_31_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25198343_23-07-2025_01_31_00.pdf','pdf','','0.16','0.04089603241072767') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25198343]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] map_info['map_portfolio_photo'] : {25198343: [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293, 1373226763, 1373226707, 1373226660, 1373226612, 1373226564, 1373226504, 1373226268, 1373226265, 1373226264, 1373226263, 1373226260, 1373226258, 1373226091, 1373225566, 1373225436, 1373225386, 1373225333, 1373225282, 1373225228, 1373224814, 1373224765, 1373224717, 1373224666, 1373224611, 1373224558, 1373223875, 1373223828, 1373223779, 1373223720, 1373223642, 1373223563, 1373223273, 1373223270, 1373223268, 1373223267, 1373223265, 1373223263, 1373223032, 1373223006, 1373222982, 1373222955, 1373222926, 1373222898, 1373222621, 1373222586, 1373222555, 1373222526, 1373222498, 1373222469, 1373222388, 1373222386, 1373222384, 1373222382, 1373222379, 1373222376, 1373222355, 1373222354, 1373222352, 1373222349, 1373222346, 1373222336, 1373222306, 1373222304, 1373222302, 1373222299, 1373222296, 1373222292, 1373222271, 1373222269, 1373222266, 1373222263, 1373222259, 1373222256]} final : False mtd_id 4302 list_pids : [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] 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, '3322460') ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25198343', '1373227853', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460')] time used for this insertion : 0.013784646987915039 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.8357114791870117 time spend to save output : 0.01401829719543457 total time spend for step 4 : 2.8497297763824463 step5:split_time_score Wed Jul 23 01:31:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25198343'] 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 : [('25198343',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25198343) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1373227371: {'path': 'temp/1753227059_1752358_1373227371_02183f23b805beaae7d3347d2325c7e7.jpg', 'extension': 'jpg'}, 1373227448: {'path': 'temp/1753227059_1752358_1373227448_e7ae11a338e66e6e0bb51267f413486e.jpg', 'extension': 'jpg'}, 1373227481: {'path': 'temp/1753227059_1752358_1373227481_f3ae6750e850139ffeb04e2b83361af9.jpg', 'extension': 'jpg'}, 1373227698: {'path': 'temp/1753227059_1752358_1373227698_729e44be182f88a884562bc2fbcc3eba.jpg', 'extension': 'jpg'}, 1373227730: {'path': 'temp/1753227059_1752358_1373227730_48d7bca9d0d6b6899c9d83a4b8b08be6.jpg', 'extension': 'jpg'}, 1373227757: {'path': 'temp/1753227059_1752358_1373227757_e7f87222159d7bf8005af22cc995d61b.jpg', 'extension': 'jpg'}, 1373227783: {'path': 'temp/1753227059_1752358_1373227783_da20981a97420203e8be0480c310cf0d.jpg', 'extension': 'jpg'}, 1373227806: {'path': 'temp/1753227059_1752358_1373227806_08aab024cd1970ae2286400c8ddbd96a.jpg', 'extension': 'jpg'}, 1373227853: {'path': 'temp/1753227059_1752358_1373227853_f07858243a199b1466a06730e3c6efeb.jpg', 'extension': 'jpg'}, 1373227293: {'path': 'temp/1753227059_1752358_1373227293_71683d97a4e89fc997140c80f184359a.jpg', 'extension': 'jpg'}, 1373227317: {'path': 'temp/1753227059_1752358_1373227317_a2d36adff47bed6cee0a55304ae28b1a.jpg', 'extension': 'jpg'}, 1373227340: {'path': 'temp/1753227059_1752358_1373227340_5d7a12940dfe8a1e9c5d836f535f717a.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 = 25198343; (('arc_en_ciel_jrm_live',), ('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 = 25198343 group by h (('01', 85),) 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=25198343 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 (25198343) 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 (25198343) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 23072025 25198343 Nombre de photos uploadées : 85 / 23040 (0%) 23072025 25198343 Nombre de photos taguées (types de déchets): 0 / 85 (0%) 23072025 25198343 Nombre de photos taguées (volume) : 0 / 85 (0%) [{'photo_id': 1373222271, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/c3e71a30d8549ab383f4c6fb60f35f37.jpg', 'username': None, 'uploaded_at': 1753226163, 'text': 'image_23072025_01_15_04_10138.jpg'}, {'photo_id': 1373222269, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/9bc2abc7b8a369a96baf9f072989a413.jpg', 'username': None, 'uploaded_at': 1753226163, 'text': 'image_23072025_01_15_14_10136.jpg'}, {'photo_id': 1373222266, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/291753e8de41d86f0f1d88b8c7824572.jpg', 'username': None, 'uploaded_at': 1753226163, 'text': 'image_23072025_01_15_25_10136.jpg'}, {'photo_id': 1373222263, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/f049967615eb1cb197c36ec4b7fe1a6b.jpg', 'username': None, 'uploaded_at': 1753226163, 'text': 'image_23072025_01_15_35_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ????????????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003713846206665039 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25198343, '2025-07-23' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1998971,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022154808044433594 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= 1998971 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25197613, 'dashboard_result_id': 12908606, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}, {'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25197615, 'dashboard_result_id': 12908607, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}, {'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25197619, 'dashboard_result_id': 12908608, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197942, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197943, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197944, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197945, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197946, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197948, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197949, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197951, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197952, 'pht': 3726}, 'url_report': ''}"}, {'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25197657, 'dashboard_result_id': 12908609, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197708, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197709, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197710, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197711, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197713, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197715, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197716, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197717, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197718, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197719, 'pht': 3726}, 'url_report': ''}"}, {'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25197783, 'dashboard_result_id': 12908610, '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_P25197783_23-07-2025_01_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197790, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197791, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197795, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197799, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197800, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197801, 'pht': 3726}}"}, {'dashboat_entry_day': 1998971, 'dashboard_run_id': 2006480, 'mtr_portfolio_id': 25198343, 'dashboard_result_id': 12908611, '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_P25198343_23-07-2025_01_28_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25198348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25198349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25198350, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25198351, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25198352, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25198353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25198354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25198355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25198356, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25198357, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25198358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25198359, '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 = 25197613 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 = 25197613 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25197613 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%25197613%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25197613 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': ''}" where mtr_portfolio_id = 25197613 and dashboard_run_id = 2006480 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 = 25197615 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': 3322373, 'mtr_portfolio_id': 25197615, 'created_at': datetime.datetime(2025, 7, 23, 1, 6, 30), 'result': '0.01191970545427833', 'result_long': None, 'result_double': None}] Qualite : 0.01191970545427833 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25197615 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%25197615%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25197615 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': ''}" where mtr_portfolio_id = 25197615 and dashboard_run_id = 2006480 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`=25197615 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12908607, 0.01191970545427833, "{'max_time_prod_two_photos': 0, 'url_report': '', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197997, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197999, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25198000, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25198001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25198002, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25198003, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25198004, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25198005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25198006, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25198007, '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 = 25197619 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': 3322374, 'mtr_portfolio_id': 25197619, 'created_at': datetime.datetime(2025, 7, 23, 1, 5, 31), 'result': '0.056877370770490834', 'result_long': None, 'result_double': None}] Qualite : 0.056877370770490834 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25197619 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%25197619%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25197619 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197942, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197943, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197944, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197945, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197946, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197948, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197949, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197951, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197952, 'pht': 3726}, 'url_report': ''}" where mtr_portfolio_id = 25197619 and dashboard_run_id = 2006482 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`=25197619 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12908608, 0.056877370770490834, "{'max_time_prod_two_photos': 0, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197942, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197943, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197944, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197945, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197946, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197948, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197949, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197951, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197952, 'pht': 3726}, 'url_report': ''}") 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 = 25197657 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 = 25197657 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25197657 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%25197657%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25197657 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197708, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197709, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197710, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197711, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197713, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197715, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197716, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197717, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197718, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197719, 'pht': 3726}, 'url_report': ''}" where mtr_portfolio_id = 25197657 and dashboard_run_id = 2006482 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 = 25197783 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': 3322391, 'mtr_portfolio_id': 25197783, 'created_at': datetime.datetime(2025, 7, 23, 1, 16, 29), 'result': '0.03898688521338545', 'result_long': None, 'result_double': None}] Qualite : 0.03898688521338545 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25197783 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25197783_23-07-2025_01_16_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25197783 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_P25197783_23-07-2025_01_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197790, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197791, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197795, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197799, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197800, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197801, 'pht': 3726}}" where mtr_portfolio_id = 25197783 and dashboard_run_id = 2006482 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`=25197783 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12908610, 0.03898688521338545, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25197783_23-07-2025_01_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25197790, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25197791, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25197792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25197793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25197794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25197795, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25197796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25197797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25197798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25197799, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25197800, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25197801, '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 = 25198343 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': 3322460, 'mtr_portfolio_id': 25198343, 'created_at': datetime.datetime(2025, 7, 23, 1, 30, 59), 'result': '0.04089603241072767', 'result_long': None, 'result_double': None}] Qualite : 0.04089603241072767 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25198343 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25198343_23-07-2025_01_31_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25198343 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_P25198343_23-07-2025_01_31_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25198348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25198349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25198350, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25198351, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25198352, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25198353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25198354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25198355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25198356, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25198357, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25198358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25198359, 'pht': 3726}}" where mtr_portfolio_id = 25198343 and dashboard_run_id = 2006482 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`=25198343 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12908611, 0.04089603241072767, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25198343_23-07-2025_01_31_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25198348, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25198349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25198350, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25198351, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25198352, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25198353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25198354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25198355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25198356, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25198357, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25198358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25198359, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25197613,25197615,25197619,25197657,25197783,25198343) result : ((1373217415,), (1373217416,), (1373217419,), (1373217422,), (1373217428,), (1373217434,), (1373217436,), (1373217439,), (1373217441,), (1373217446,), (1373217449,), (1373217453,), (1373217457,), (1373217462,), (1373217596,), (1373217833,), (1373218054,), (1373218126,), (1373218320,), (1373217468,), (1373217469,), (1373217472,), (1373217478,), (1373217480,), (1373217486,), (1373217487,), (1373217490,), (1373217495,), (1373217499,), (1373217504,), (1373217506,), (1373217509,), (1373217510,), (1373217516,), (1373217592,), (1373217840,), (1373218072,), (1373218163,), (1373218297,), (1373217520,), (1373217526,), (1373217530,), (1373217531,), (1373217538,), (1373217543,), (1373217545,), (1373217548,), (1373217550,), (1373217553,), (1373217554,), (1373217560,), (1373217562,), (1373217566,), (1373217569,), (1373217624,), (1373217875,), (1373218078,), (1373218272,), (1373218344,), (1373217741,), (1373217828,), (1373218043,), (1373218129,), (1373218279,), (1373218359,), (1373218425,), (1373218426,), (1373218427,), (1373218430,), (1373218437,), (1373218840,), (1373218854,), (1373218893,), (1373218897,), (1373218901,), (1373218904,), (1373218907,), (1373218914,), (1373218944,), (1373218948,), (1373218951,), (1373218954,), (1373218956,), (1373218959,), (1373219138,), (1373219163,), (1373219211,), (1373219263,), (1373219311,), (1373219364,), (1373219907,), (1373220252,), (1373220270,), (1373220298,), (1373220325,), (1373220351,), (1373220378,), (1373220599,), (1373220631,), (1373220658,), (1373220684,), (1373220708,), (1373220734,), (1373221226,), (1373221254,), (1373221282,), (1373221318,), (1373221355,), (1373221403,), (1373221814,), (1373221845,), (1373221866,), (1373221868,), (1373221870,), (1373221871,), (1373222037,), (1373222052,), (1373222056,), (1373222058,), (1373222060,), (1373222063,), (1373222089,), (1373222093,), (1373222096,), (1373222100,), (1373222104,), (1373222106,), (1373222123,), (1373222127,), (1373222132,), (1373222135,), (1373222137,), (1373222139,), (1373222158,), (1373222161,), (1373222163,), (1373222165,), (1373222167,), (1373222170,), (1373222199,), (1373222205,), (1373222210,), (1373222214,), (1373222216,), (1373222218,), (1373222231,), (1373222256,), (1373222259,), (1373222263,), (1373222266,), (1373222269,), (1373222271,), (1373222292,), (1373222296,), (1373222299,), (1373222302,), (1373222304,), (1373222306,), (1373222336,), (1373222346,), (1373222349,), (1373222352,), (1373222354,), (1373222355,), (1373222376,), (1373222379,), (1373222382,), (1373222384,), (1373222386,), (1373222388,), (1373222469,), (1373222498,), (1373222526,), (1373222555,), (1373222586,), (1373222621,), (1373222898,), (1373222926,), (1373222955,), (1373222982,), (1373223006,), (1373223032,), (1373223263,), (1373223265,), (1373223267,), (1373223268,), (1373223270,), (1373223273,), (1373223563,), (1373223642,), (1373223720,), (1373223779,), (1373223828,), (1373223875,), (1373224558,), (1373224611,), (1373224666,), (1373224717,), (1373224765,), (1373224814,), (1373225228,), (1373225282,), (1373225333,), (1373225386,), (1373225436,), (1373225566,), (1373226091,), (1373226258,), (1373226260,), (1373226263,), (1373226264,), (1373226265,), (1373226268,), (1373226504,), (1373226564,), (1373226612,), (1373226660,), (1373226707,), (1373226763,), (1373227293,), (1373227317,), (1373227340,), (1373227371,), (1373227448,), (1373227481,), (1373227698,), (1373227730,), (1373227757,), (1373227783,), (1373227806,), (1373227853,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'23072025': {'nb_upload': 85, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25198343]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] map_info['map_portfolio_photo'] : {25198343: [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293, 1373226763, 1373226707, 1373226660, 1373226612, 1373226564, 1373226504, 1373226268, 1373226265, 1373226264, 1373226263, 1373226260, 1373226258, 1373226091, 1373225566, 1373225436, 1373225386, 1373225333, 1373225282, 1373225228, 1373224814, 1373224765, 1373224717, 1373224666, 1373224611, 1373224558, 1373223875, 1373223828, 1373223779, 1373223720, 1373223642, 1373223563, 1373223273, 1373223270, 1373223268, 1373223267, 1373223265, 1373223263, 1373223032, 1373223006, 1373222982, 1373222955, 1373222926, 1373222898, 1373222621, 1373222586, 1373222555, 1373222526, 1373222498, 1373222469, 1373222388, 1373222386, 1373222384, 1373222382, 1373222379, 1373222376, 1373222355, 1373222354, 1373222352, 1373222349, 1373222346, 1373222336, 1373222306, 1373222304, 1373222302, 1373222299, 1373222296, 1373222292, 1373222271, 1373222269, 1373222266, 1373222263, 1373222259, 1373222256]} final : True mtd_id 4302 list_pids : [1373227853, 1373227806, 1373227783, 1373227757, 1373227730, 1373227698, 1373227481, 1373227448, 1373227371, 1373227340, 1373227317, 1373227293] Looping around the photos to save general results len do output : 1 /25198343Didn'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, '3322460') ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460') ('4302', None, None, None, None, None, None, None, '3322460') ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25198343', 'None', None, None, None, None, '3322460'), ('4302', '25198343', '1373227853', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227806', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227783', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227757', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227730', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227698', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227481', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227448', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227371', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227340', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227317', None, None, None, None, None, '3322460'), ('4302', '25198343', '1373227293', None, None, None, None, None, '3322460')] time used for this insertion : 0.013321399688720703 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.8565118312835693 time spend to save output : 0.013545751571655273 total time spend for step 5 : 3.8700575828552246 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 (3322460) 2.04user 2.43system 0:11.17elapsed 39%CPU (0avgtext+0avgdata 162324maxresident)k 256inputs+9848outputs (3major+64358minor)pagefaults 0swaps