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 : 1543050 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 (2746851) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2746851) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285832 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2746851'] with mtr_portfolio_ids : ['22285832'] and first list_photo_ids : [] new path : /proc/1543050/ Name: python3 Umask: 0002 State: R (running) Tgid: 1543050 Ngid: 0 Pid: 1543050 PPid: 1543049 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1543050 NSpid: 1543050 NSpgid: 1539623 NSsid: 1539623 VmPeak: 1106936 kB VmSize: 1106936 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99468 kB VmRSS: 99468 kB RssAnon: 59768 kB RssFile: 39700 kB RssShmem: 0 kB VmData: 865684 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 628 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 49 nonvoluntary_ctxt_switches: 106 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1543050', 'Ngid': '0', 'Pid': '1543050', 'PPid': '1543049', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1543050', 'NSpid': '1543050', 'NSpgid': '1539623', 'NSsid': '1539623', 'VmPeak': '1106936 kB', 'VmSize': '1106936 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99468 kB', 'VmRSS': '99468 kB', 'RssAnon': '59768 kB', 'RssFile': '39700 kB', 'RssShmem': '0 kB', 'VmData': '865684 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '628 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '49', 'nonvoluntary_ctxt_switches': '106'} ('datou_batch_current', '1543050', '1106936', '0', '1106936', '865684', '99468', b'', 'marlene', '2746851') 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 (22285832) 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 (2746851 ) ) 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 (22285832) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1352530712, 'portfolio_id': 22285832}, {'photo_id': 1352530665, 'portfolio_id': 22285832}, {'photo_id': 1352530663, 'portfolio_id': 22285832}, {'photo_id': 1352530660, 'portfolio_id': 22285832}, {'photo_id': 1352530657, 'portfolio_id': 22285832}, {'photo_id': 1352530631, 'portfolio_id': 22285832}, {'photo_id': 1352530628, 'portfolio_id': 22285832}, {'photo_id': 1352530624, 'portfolio_id': 22285832}, {'photo_id': 1352530620, 'portfolio_id': 22285832}, {'photo_id': 1352530617, 'portfolio_id': 22285832}, {'photo_id': 1352530613, 'portfolio_id': 22285832}, {'photo_id': 1352530584, 'portfolio_id': 22285832}, {'photo_id': 1352530581, 'portfolio_id': 22285832}, {'photo_id': 1352530579, 'portfolio_id': 22285832}, {'photo_id': 1352530552, 'portfolio_id': 22285832}, {'photo_id': 1352530548, 'portfolio_id': 22285832}, {'photo_id': 1352530545, 'portfolio_id': 22285832}, {'photo_id': 1352530542, 'portfolio_id': 22285832}, {'photo_id': 1352530537, 'portfolio_id': 22285832}, {'photo_id': 1352530503, 'portfolio_id': 22285832}, {'photo_id': 1352530498, 'portfolio_id': 22285832}, {'photo_id': 1352530493, 'portfolio_id': 22285832}, {'photo_id': 1352530491, 'portfolio_id': 22285832}, {'photo_id': 1352530489, 'portfolio_id': 22285832}, {'photo_id': 1352530484, 'portfolio_id': 22285832}, {'photo_id': 1352530437, 'portfolio_id': 22285832}, {'photo_id': 1352530434, 'portfolio_id': 22285832}, {'photo_id': 1352530431, 'portfolio_id': 22285832}, {'photo_id': 1352530428, 'portfolio_id': 22285832}, {'photo_id': 1352530396, 'portfolio_id': 22285832}, {'photo_id': 1352530391, 'portfolio_id': 22285832}, {'photo_id': 1352530389, 'portfolio_id': 22285832}, {'photo_id': 1352530387, 'portfolio_id': 22285832}, {'photo_id': 1352530363, 'portfolio_id': 22285832}, {'photo_id': 1352530358, 'portfolio_id': 22285832}, {'photo_id': 1352530354, 'portfolio_id': 22285832}, {'photo_id': 1352530351, 'portfolio_id': 22285832}, {'photo_id': 1352530348, 'portfolio_id': 22285832}, {'photo_id': 1352530345, 'portfolio_id': 22285832}, {'photo_id': 1352530310, 'portfolio_id': 22285832}, {'photo_id': 1352530307, 'portfolio_id': 22285832}, {'photo_id': 1352530304, 'portfolio_id': 22285832}, {'photo_id': 1352530302, 'portfolio_id': 22285832}, {'photo_id': 1352530283, 'portfolio_id': 22285832}, {'photo_id': 1352530278, 'portfolio_id': 22285832}, {'photo_id': 1352530274, 'portfolio_id': 22285832}, {'photo_id': 1352530268, 'portfolio_id': 22285832}, {'photo_id': 1352530260, 'portfolio_id': 22285832}, {'photo_id': 1352530226, 'portfolio_id': 22285832}, {'photo_id': 1352530223, 'portfolio_id': 22285832}, {'photo_id': 1352530221, 'portfolio_id': 22285832}, {'photo_id': 1352530219, 'portfolio_id': 22285832}, {'photo_id': 1352530216, 'portfolio_id': 22285832}, {'photo_id': 1352530191, 'portfolio_id': 22285832}, {'photo_id': 1352530187, 'portfolio_id': 22285832}, {'photo_id': 1352530183, 'portfolio_id': 22285832}, {'photo_id': 1352530180, 'portfolio_id': 22285832}, {'photo_id': 1352530176, 'portfolio_id': 22285832}, {'photo_id': 1352530140, 'portfolio_id': 22285832}, {'photo_id': 1352530136, 'portfolio_id': 22285832}, {'photo_id': 1352530133, 'portfolio_id': 22285832}, {'photo_id': 1352530131, 'portfolio_id': 22285832}, {'photo_id': 1352530129, 'portfolio_id': 22285832}, {'photo_id': 1352530126, 'portfolio_id': 22285832}, {'photo_id': 1352530091, 'portfolio_id': 22285832}, {'photo_id': 1352530086, 'portfolio_id': 22285832}, {'photo_id': 1352530083, 'portfolio_id': 22285832}, {'photo_id': 1352530080, 'portfolio_id': 22285832}, {'photo_id': 1352530073, 'portfolio_id': 22285832}, {'photo_id': 1352530029, 'portfolio_id': 22285832}] map_portfolio_id_photo_id: {22285832: [1352530712, 1352530665, 1352530663, 1352530660, 1352530657, 1352530631, 1352530628, 1352530624, 1352530620, 1352530617, 1352530613, 1352530584, 1352530581, 1352530579, 1352530552, 1352530548, 1352530545, 1352530542, 1352530537, 1352530503, 1352530498, 1352530493, 1352530491, 1352530489, 1352530484, 1352530437, 1352530434, 1352530431, 1352530428, 1352530396, 1352530391, 1352530389, 1352530387, 1352530363, 1352530358, 1352530354, 1352530351, 1352530348, 1352530345, 1352530310, 1352530307, 1352530304, 1352530302, 1352530283, 1352530278, 1352530274, 1352530268, 1352530260, 1352530226, 1352530223, 1352530221, 1352530219, 1352530216, 1352530191, 1352530187, 1352530183, 1352530180, 1352530176, 1352530140, 1352530136, 1352530133, 1352530131, 1352530129, 1352530126, 1352530091, 1352530086, 1352530083, 1352530080, 1352530073, 1352530029]} ##### 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.017014026641845703 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Apr 22 06:48:56 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 (22285832) 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 : 22285832 get user id for portfolio 22285832 get sub ptf for main ptf 22285832, type 3726 and hashtags ['plastique', 'autre_refus', 'mal_croppe', 'environnement', 'papier', 'Carton_brun', 'flou', 'kraft', 'metal', 'Teint_Dans_La_Masse', 'cartonnette', '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`=22285832 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','mal_croppe','environnement','papier','Carton_brun','flou','kraft','metal','Teint_Dans_La_Masse','cartonnette','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`=22285832 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','mal_croppe','environnement','papier','Carton_brun','flou','kraft','metal','Teint_Dans_La_Masse','cartonnette','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22285832, 'sub_port_id': 22285857, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749579, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'kraft': {'main_port_id': 22285832, 'sub_port_id': 22285858, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749580, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'Carton_gris': {'main_port_id': 22285832, 'sub_port_id': 22285859, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749581, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'papier': {'main_port_id': 22285832, 'sub_port_id': 22285860, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749582, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 22285832, 'sub_port_id': 22285861, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749583, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'flou': {'main_port_id': 22285832, 'sub_port_id': 22285862, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749584, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'autre_refus': {'main_port_id': 22285832, 'sub_port_id': 22285863, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749585, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'Carton_brun': {'main_port_id': 22285832, 'sub_port_id': 22285864, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749586, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'mal_croppe': {'main_port_id': 22285832, 'sub_port_id': 22285865, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749587, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'cartonnette': {'main_port_id': 22285832, 'sub_port_id': 22285866, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749588, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'environnement': {'main_port_id': 22285832, 'sub_port_id': 22285867, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749589, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}, 'metal': {'main_port_id': 22285832, 'sub_port_id': 22285868, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749590, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22285857 , 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=22285832 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 (22285857) result : ((1352530272,), (1352530273,), (1352530423,), (1352530471,), (1352530519,), (1352530520,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285858 , 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=22285832 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 (22285858) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285859 , 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=22285832 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 (22285859) result : ((1352530250,), (1352530269,), (1352530417,), (1352530418,), (1352530458,), (1352530459,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285860 , 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=22285832 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 (22285860) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285861 , 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=22285832 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 (22285861) result : ((1352530244,), (1352530245,), (1352530246,), (1352530262,), (1352530263,), (1352530264,), (1352530265,), (1352530289,), (1352530290,), (1352530455,), (1352530456,), (1352530457,), (1352530516,), (1352530517,), (1352530795,), (1352530796,), (1352530797,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285862 , 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=22285832 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 (22285862) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285863 , 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=22285832 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 (22285863) result : ((1352530248,), (1352530249,), (1352530266,), (1352530415,), (1352530482,), (1352530483,), (1352530518,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285864 , 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=22285832 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 (22285864) result : ((1352530270,), (1352530271,), (1352530419,), (1352530420,), (1352530466,), (1352530467,), (1352530468,), (1352530469,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285865 , 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=22285832 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 (22285865) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285866 , 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=22285832 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 (22285866) result : ((1352530252,), (1352530463,), (1352530464,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285867 , 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=22285832 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 (22285867) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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 22285868 , 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=22285832 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 (22285868) result : ((1352530253,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285832) result : ((1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,)) 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`=22285832 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','mal_croppe','environnement','papier','Carton_brun','flou','kraft','metal','Teint_Dans_La_Masse','cartonnette','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`=22285832 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','mal_croppe','environnement','papier','Carton_brun','flou','kraft','metal','Teint_Dans_La_Masse','cartonnette','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22285832, 'sub_port_id': 22285869, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749591, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'kraft': {'main_port_id': 22285832, 'sub_port_id': 22285870, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749592, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'Carton_gris': {'main_port_id': 22285832, 'sub_port_id': 22285871, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749593, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'papier': {'main_port_id': 22285832, 'sub_port_id': 22285872, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749594, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22285832, 'sub_port_id': 22285873, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749595, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'flou': {'main_port_id': 22285832, 'sub_port_id': 22285874, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749596, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'autre_refus': {'main_port_id': 22285832, 'sub_port_id': 22285875, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749597, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'Carton_brun': {'main_port_id': 22285832, 'sub_port_id': 22285876, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749598, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'mal_croppe': {'main_port_id': 22285832, 'sub_port_id': 22285877, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749599, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'cartonnette': {'main_port_id': 22285832, 'sub_port_id': 22285878, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749600, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'environnement': {'main_port_id': 22285832, 'sub_port_id': 22285879, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749601, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 36, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}, 'metal': {'main_port_id': 22285832, 'sub_port_id': 22285880, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14749602, 'last_updated_at': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 22, 6, 46, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 22, 6, 36, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285869,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285857 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285870,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285858 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285871,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285859 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285872,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285860 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285873,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285861 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285874,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285862 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285875,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285863 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285876,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285864 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285877,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285865 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285878,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285866 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285879,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285867 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22285880,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22285868 lien utilise dans velours : https://www.fotonower.com/velours/22285869,22285870,22285871,22285872,22285873,22285874,22285875,22285876,22285877,22285878,22285879,22285880?tags=plastique,kraft,Carton_gris,papier,Teint_Dans_La_Masse,flou,autre_refus,Carton_brun,mal_croppe,cartonnette,environnement,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22285832]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1352530712] map_info['map_portfolio_photo'] : {22285832: [1352530712, 1352530665, 1352530663, 1352530660, 1352530657, 1352530631, 1352530628, 1352530624, 1352530620, 1352530617, 1352530613, 1352530584, 1352530581, 1352530579, 1352530552, 1352530548, 1352530545, 1352530542, 1352530537, 1352530503, 1352530498, 1352530493, 1352530491, 1352530489, 1352530484, 1352530437, 1352530434, 1352530431, 1352530428, 1352530396, 1352530391, 1352530389, 1352530387, 1352530363, 1352530358, 1352530354, 1352530351, 1352530348, 1352530345, 1352530310, 1352530307, 1352530304, 1352530302, 1352530283, 1352530278, 1352530274, 1352530268, 1352530260, 1352530226, 1352530223, 1352530221, 1352530219, 1352530216, 1352530191, 1352530187, 1352530183, 1352530180, 1352530176, 1352530140, 1352530136, 1352530133, 1352530131, 1352530129, 1352530126, 1352530091, 1352530086, 1352530083, 1352530080, 1352530073, 1352530029]} final : False mtd_id 4302 list_pids : [1352530712] Looping around the photos to save general results len do output : 1 /22285832. 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, '2746851') ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22285832', "{'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868}", None, None, None, None, '2746851'), ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851')] time used for this insertion : 0.012575387954711914 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.389312505722046 time spend to save output : 0.012825489044189453 total time spend for step 1 : 1.4021379947662354 step2:final Tue Apr 22 06:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (22285832) 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 22285832 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1352530029,1352530091,1352530086,1352530083,1352530080,1352530073,1352530140,1352530136,1352530133,1352530131,1352530129,1352530126,1352530191,1352530187,1352530183,1352530180,1352530176,1352530226,1352530223,1352530221,1352530219,1352530216,1352530283,1352530278,1352530274,1352530268,1352530260,1352530310,1352530307,1352530304,1352530302,1352530363,1352530358,1352530354,1352530351,1352530348,1352530345,1352530396,1352530391,1352530389,1352530387,1352530437,1352530434,1352530431,1352530428,1352530503,1352530498,1352530493,1352530491,1352530489,1352530484,1352530552,1352530548,1352530545,1352530542,1352530537,1352530584,1352530581,1352530579,1352530631,1352530628,1352530624,1352530620,1352530617,1352530613,1352530665,1352530663,1352530660,1352530657,1352530712); 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([22285832]) Inside saveOutput : final : False verbose : True original output for save of step final : {1352530712: ('0.05518727894071494',)} new output for save of step final : {1352530712: ('0.05518727894071494',)} [1352530712] map_info['map_portfolio_photo'] : {22285832: [1352530712, 1352530665, 1352530663, 1352530660, 1352530657, 1352530631, 1352530628, 1352530624, 1352530620, 1352530617, 1352530613, 1352530584, 1352530581, 1352530579, 1352530552, 1352530548, 1352530545, 1352530542, 1352530537, 1352530503, 1352530498, 1352530493, 1352530491, 1352530489, 1352530484, 1352530437, 1352530434, 1352530431, 1352530428, 1352530396, 1352530391, 1352530389, 1352530387, 1352530363, 1352530358, 1352530354, 1352530351, 1352530348, 1352530345, 1352530310, 1352530307, 1352530304, 1352530302, 1352530283, 1352530278, 1352530274, 1352530268, 1352530260, 1352530226, 1352530223, 1352530221, 1352530219, 1352530216, 1352530191, 1352530187, 1352530183, 1352530180, 1352530176, 1352530140, 1352530136, 1352530133, 1352530131, 1352530129, 1352530126, 1352530091, 1352530086, 1352530083, 1352530080, 1352530073, 1352530029]} final : False mtd_id 4302 list_pids : [1352530712] Looping around the photos to save general results len do output : 1 /1352530712.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, '2746851') ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22285832', '1352530712', '0.05518727894071494', None, None, None, None, '2746851')] time used for this insertion : 0.010694742202758789 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07013392448425293 time spend to save output : 0.01086568832397461 total time spend for step 2 : 0.08099961280822754 step3:velours_tree Tue Apr 22 06:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {22285832: [{'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868}]} input_args_next_step : {22285832: ()} output_args : {22285832: [{'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868}]} args : 22285832 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 : ({'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22285832) 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([22285832]) 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.33232975006103516 time spend to save output : 7.414817810058594e-05 total time spend for step 3 : 0.33240389823913574 step4:send_mail_cod Tue Apr 22 06:48:58 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 : {1352530712: ('0.05518727894071494',)} input_args_next_step : {1352530712: ()} output_args : {1352530712: ('0.05518727894071494',)} args : 1352530712 depend.output_id : 0 complete output_args for input 3 : {22285832: [{'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868}]} input_args_next_step : {1352530712: ('0.05518727894071494',), 22285832: ()} output_args : {22285832: [{'plastique': 22285857, 'kraft': 22285858, 'Carton_gris': 22285859, 'papier': 22285860, 'Teint_Dans_La_Masse': 22285861, 'flou': 22285862, 'autre_refus': 22285863, 'Carton_brun': 22285864, 'mal_croppe': 22285865, 'cartonnette': 22285866, 'environnement': 22285867, 'metal': 22285868}]} args : 22285832 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.05518727894071494',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22285832) 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 (1352530712) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1352530712 download finish for photo 1352530712 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P22285832_22-04-2025_06_48_58.pdf 22285857 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=22285857 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530272: '1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518326_0.png', 1352530273: '1745296541_517446_1352530126_1e553d7e5341dee1042c9b968939a253_rle_crop_3762518340_0.png', 1352530423: '1745296753_2836950_1352530274_fc8d433a894c14f699885d896ca36fc0_rle_crop_3762519066_0.png', 1352530471: '1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519445_0.png', 1352530519: '1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519684_0.png', 1352530520: '1745296862_2838116_1352530176_00679bf62293d5ddf1b4bf669c3284f9_rle_crop_3762519708_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/2aa1caacd26e6984c190ce04f0cbc524_15140445.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/aedcf8f6877e8634e816a9fbfff59257_4067652.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/1acc68c503e67372332c6a0077910b1e_11959711.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/a1f079cb2873e28034b55df34f16d370_28432209.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/8964f9c582a7e3a895a8f4e161a3e3d9_58077762.png change filename to text .imagette222858571745297338/ imagette222858571745297338/1745296862_2838116_1352530176_00679bf62293d5ddf1b4bf669c3284f9_rle_crop_3762519708_0.png.png imagette222858571745297338/1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518326_0.png.png imagette222858571745297338/1745296541_517446_1352530126_1e553d7e5341dee1042c9b968939a253_rle_crop_3762518340_0.png.png imagette222858571745297338/1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519445_0.png.png imagette222858571745297338/1745296753_2836950_1352530274_fc8d433a894c14f699885d896ca36fc0_rle_crop_3762519066_0.png.png imagette222858571745297338/1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519684_0.png.png imagette222858581745297339/ imagette222858621745297339/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/001884c1ef7b7d778e0f64ab0eba6b4d_41466462.png imagette222858571745297338 22285858 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=22285858 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222858581745297339 22285862 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=22285862 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222858621745297339 22285863 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=22285863 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530248: '1745296513_2834943_1352530140_eb164fd54c862fdcf1485ceadbc7a589_rle_crop_3762518068_0.png', 1352530249: '1745296513_2834943_1352530140_eb164fd54c862fdcf1485ceadbc7a589_rle_crop_3762518067_0.png', 1352530266: '1745296541_517446_1352530131_33ad21b595f305c996d21124127f6bd9_rle_crop_3762518305_0.png', 1352530415: '1745296753_2836950_1352530278_acbdab35750ecc20237858f6dca3761a_rle_crop_3762519051_0.png', 1352530482: '1745296838_1511022_1352530191_87f6ba47b7ffcb74a1c36df344489b32_rle_crop_3762519539_0.png', 1352530483: '1745296838_1511022_1352530191_87f6ba47b7ffcb74a1c36df344489b32_rle_crop_3762519540_0.png', 1352530518: '1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519685_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/e25e4a56653f95cfb8cd3697ed4ac17e_71752524.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/e415e91b0cfef61bcbdd375f52b09486_56613545.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/81067e532c9c86077b392edc88f7d601_61964910.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/8d9c47c1abd90290f036b8275adbf943_37304791.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/74b4a1976ae5309999f08297d32707fb_27672829.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/3b163a13edf8788b379196f83aea483a_2952341.png change filename to text .imagette222858631745297339/ imagette222858631745297339/1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519685_0.png.png imagette222858631745297339/1745296838_1511022_1352530191_87f6ba47b7ffcb74a1c36df344489b32_rle_crop_3762519540_0.png.png imagette222858631745297339/1745296838_1511022_1352530191_87f6ba47b7ffcb74a1c36df344489b32_rle_crop_3762519539_0.png.png imagette222858631745297339/1745296753_2836950_1352530278_acbdab35750ecc20237858f6dca3761a_rle_crop_3762519051_0.png.png imagette222858631745297339/1745296513_2834943_1352530140_eb164fd54c862fdcf1485ceadbc7a589_rle_crop_3762518067_0.png.png imagette222858631745297339/1745296513_2834943_1352530140_eb164fd54c862fdcf1485ceadbc7a589_rle_crop_3762518068_0.png.png imagette222858631745297339/1745296541_517446_1352530131_33ad21b595f305c996d21124127f6bd9_rle_crop_3762518305_0.png.png imagette222858651745297339/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/3731438ee0b73b9d8a9251e8d61776ab_14981295.png imagette222858631745297339 22285865 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=22285865 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222858651745297339 22285866 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=22285866 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530252: '1745296513_2834943_1352530080_dc3cef236724925453a4fdc25fe37771_rle_crop_3762518105_0.png', 1352530463: '1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519440_0.png', 1352530464: '1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519438_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/c76e3e4027cbbdcdbe2ebe5ec030128a_41649284.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/4f8e1db7417547805aa6ec53acc7907c_32057668.png change filename to text .imagette222858661745297339/ imagette222858661745297339/1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519440_0.png.png imagette222858661745297339/1745296513_2834943_1352530080_dc3cef236724925453a4fdc25fe37771_rle_crop_3762518105_0.png.png imagette222858661745297339/1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519438_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/b01c05ce85a79b15ddebfec4b107ce56_89564240.png imagette222858661745297339 22285868 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=22285868 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530253: '1745296513_2834943_1352530073_daaa59bf5fb0937a14c645149598c890_rle_crop_3762518127_0.png'} change filename to text .imagette222858681745297339/ imagette222858681745297339/1745296513_2834943_1352530073_daaa59bf5fb0937a14c645149598c890_rle_crop_3762518127_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/2641d0418f4217f13b1440a12fe59f7f_75673603.png imagette222858681745297339 22285859 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=22285859 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530250: '1745296513_2834943_1352530083_90923c28a26f5369e3dd5d8f05e792de_rle_crop_3762518093_0.png', 1352530269: '1745296541_517446_1352530136_4623f425d8964d87f71f77941a604e7a_rle_crop_3762518278_0.png', 1352530417: '1745296753_2836950_1352530268_adfd3a79119cc2435e551f155ff369da_rle_crop_3762519078_0.png', 1352530418: '1745296753_2836950_1352530260_f5a4c033e83673c39035812313117429_rle_crop_3762519091_0.png', 1352530458: '1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519379_0.png', 1352530459: '1745296811_2837658_1352530221_41d2748952b5e4df307370a000be4547_rle_crop_3762519417_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/45509d48dedc50e36a41a5ed2ee75970_2723192.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/d90c58e4b596f755bd0d78bdc7951962_98921332.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/b3622e67721aa73dcaa898fddddcd143_54968766.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/e3f4e605fdf77e5c19e5c9489586716b_546143.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/61e8016e35959b0632965717055f6567_10529611.png change filename to text .imagette222858591745297339/ imagette222858591745297339/1745296541_517446_1352530136_4623f425d8964d87f71f77941a604e7a_rle_crop_3762518278_0.png.png imagette222858591745297339/1745296753_2836950_1352530260_f5a4c033e83673c39035812313117429_rle_crop_3762519091_0.png.png imagette222858591745297339/1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519379_0.png.png imagette222858591745297339/1745296753_2836950_1352530268_adfd3a79119cc2435e551f155ff369da_rle_crop_3762519078_0.png.png imagette222858591745297339/1745296811_2837658_1352530221_41d2748952b5e4df307370a000be4547_rle_crop_3762519417_0.png.png imagette222858591745297339/1745296513_2834943_1352530083_90923c28a26f5369e3dd5d8f05e792de_rle_crop_3762518093_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/a56346743d39319a9dff858204f8cd69_18061655.png imagette222858591745297339 22285861 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=22285861 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530290: '1745296574_2835498_1352530091_9d7c128cc96a8e2d5266fbcce24072e8_rle_crop_3762518470_0.png', 1352530797: '1745297293_2840809_1352530657_da0139d89e2421342f0e8a43acaccf80_rle_crop_3762520397_0.png', 1352530796: '1745297293_2840809_1352530663_f72a4d9478442c4666fa9fb5aa680221_rle_crop_3762520384_0.png', 1352530795: '1745297293_2840809_1352530663_f72a4d9478442c4666fa9fb5aa680221_rle_crop_3762520382_0.png', 1352530517: '1745296862_2838116_1352530176_00679bf62293d5ddf1b4bf669c3284f9_rle_crop_3762519714_0.png', 1352530516: '1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519687_0.png', 1352530457: '1745296811_2837658_1352530219_587d319c02fde9f480ccc6f0e299dc85_rle_crop_3762519426_0.png', 1352530456: '1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519388_0.png', 1352530455: '1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519382_0.png', 1352530244: '1745296513_2834943_1352530086_dbb8c6e8676116feb281bb2b98c4044b_rle_crop_3762518090_0.png', 1352530289: '1745296574_2835498_1352530091_9d7c128cc96a8e2d5266fbcce24072e8_rle_crop_3762518466_0.png', 1352530265: '1745296541_517446_1352530126_1e553d7e5341dee1042c9b968939a253_rle_crop_3762518338_0.png', 1352530264: '1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518322_0.png', 1352530263: '1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518323_0.png', 1352530262: '1745296541_517446_1352530133_6366550cd81cc9747f127387edacac89_rle_crop_3762518295_0.png', 1352530246: '1745296513_2834943_1352530080_dc3cef236724925453a4fdc25fe37771_rle_crop_3762518111_0.png', 1352530245: '1745296513_2834943_1352530086_dbb8c6e8676116feb281bb2b98c4044b_rle_crop_3762518087_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/28a5907ab7bcb95bbf1bc60bcd12b551_41488570.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/66a4e9b8c4925a306aa554ab0e32660a_20824041.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/e8e9680064929ca2471af782640ad082_17930842.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/771d0b5a4a938f99a58768ad2387ba6f_41150468.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/0f711ab8307c3ac189101993ee124b43_80391348.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/b398c20081aa832bd61b0fbb1991d8fd_27478119.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/945b579128d407b2532d1ef1d258a520_26967371.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/6747100c0ca6de65c8af69bd1d94091a_53052282.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/789dd7b01c49b341621d776fc32f9617_31084889.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/1e01a7482c0945753492527ad809919f_82548227.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/9dd59761198f352096d39a05f6230d1b_73325657.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/f30df9579414310865b27e74659ee791_59472077.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/bff1b6c4b8258dbaac5a704661f0bc91_47442512.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/2f77cf65824ed8b52b1264384fe30f5d_59723552.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/ab1c13e8c80ee7fc6f34f34765e44d1c_15758903.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/f9fa39d6a91a34cf456e15d22d6ff23a_20558580.png change filename to text .imagette222858611745297340/ imagette222858611745297340/1745297293_2840809_1352530657_da0139d89e2421342f0e8a43acaccf80_rle_crop_3762520397_0.png.png imagette222858611745297340/1745296513_2834943_1352530086_dbb8c6e8676116feb281bb2b98c4044b_rle_crop_3762518087_0.png.png imagette222858611745297340/1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519388_0.png.png imagette222858611745297340/1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518322_0.png.png imagette222858611745297340/1745297293_2840809_1352530663_f72a4d9478442c4666fa9fb5aa680221_rle_crop_3762520382_0.png.png imagette222858611745297340/1745296811_2837658_1352530219_587d319c02fde9f480ccc6f0e299dc85_rle_crop_3762519426_0.png.png imagette222858611745297340/1745296862_2838116_1352530176_00679bf62293d5ddf1b4bf669c3284f9_rle_crop_3762519714_0.png.png imagette222858611745297340/1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519382_0.png.png imagette222858611745297340/1745296513_2834943_1352530080_dc3cef236724925453a4fdc25fe37771_rle_crop_3762518111_0.png.png imagette222858611745297340/1745296541_517446_1352530129_8a7c15635fb5bd854fefa3bf0817aeb9_rle_crop_3762518323_0.png.png imagette222858611745297340/1745296541_517446_1352530133_6366550cd81cc9747f127387edacac89_rle_crop_3762518295_0.png.png imagette222858611745297340/1745296862_2838116_1352530226_88776463194fed804f2be20a82a07f56_rle_crop_3762519687_0.png.png imagette222858611745297340/1745296541_517446_1352530126_1e553d7e5341dee1042c9b968939a253_rle_crop_3762518338_0.png.png imagette222858611745297340/1745297293_2840809_1352530663_f72a4d9478442c4666fa9fb5aa680221_rle_crop_3762520384_0.png.png imagette222858611745297340/1745296574_2835498_1352530091_9d7c128cc96a8e2d5266fbcce24072e8_rle_crop_3762518466_0.png.png imagette222858611745297340/1745296574_2835498_1352530091_9d7c128cc96a8e2d5266fbcce24072e8_rle_crop_3762518470_0.png.png imagette222858611745297340/1745296513_2834943_1352530086_dbb8c6e8676116feb281bb2b98c4044b_rle_crop_3762518090_0.png.png wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/fa415773c185adbd999e445c3fed0b0f_60783982.png imagette222858611745297340 22285864 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=22285864 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352530270: '1745296541_517446_1352530136_4623f425d8964d87f71f77941a604e7a_rle_crop_3762518285_0.png', 1352530271: '1745296541_517446_1352530133_6366550cd81cc9747f127387edacac89_rle_crop_3762518291_0.png', 1352530419: '1745296753_2836950_1352530278_acbdab35750ecc20237858f6dca3761a_rle_crop_3762519053_0.png', 1352530420: '1745296753_2836950_1352530268_adfd3a79119cc2435e551f155ff369da_rle_crop_3762519073_0.png', 1352530466: '1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519383_0.png', 1352530467: '1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519385_0.png', 1352530468: '1745296811_2837658_1352530223_20cda96d50cf6bd6a4f902232ad3157b_rle_crop_3762519404_0.png', 1352530469: '1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519439_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/e44de7b06c312447f91e297b24b30f78_25823701.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/d76b2eb097f4a5b7ad94cf509d51ead8_72225497.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/a12daf9e091cf179a6a64602394bcb9c_245837.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/232a5e705e9a4fcd7e28f61ee2774f94_63081329.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/2bc1c3976213902bfc1841867280c2ea_62531938.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/8091a785c140278e19dd4cfb46c14699_33311315.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/41007dea31bfce2fa324123a56b29320_66348280.png change filename to text .imagette222858641745297341/ imagette222858641745297341/1745296541_517446_1352530133_6366550cd81cc9747f127387edacac89_rle_crop_3762518291_0.png.png imagette222858641745297341/1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519383_0.png.png imagette222858641745297341/1745296753_2836950_1352530278_acbdab35750ecc20237858f6dca3761a_rle_crop_3762519053_0.png.png imagette222858641745297341/1745296811_2837658_1352530223_20cda96d50cf6bd6a4f902232ad3157b_rle_crop_3762519404_0.png.png imagette222858641745297341/1745296541_517446_1352530136_4623f425d8964d87f71f77941a604e7a_rle_crop_3762518285_0.png.png imagette222858641745297341/1745296753_2836950_1352530268_adfd3a79119cc2435e551f155ff369da_rle_crop_3762519073_0.png.png imagette222858641745297341/1745296811_2837658_1352530216_516f884408b99f6b99b4c9c4a4572286_rle_crop_3762519439_0.png.png imagette222858641745297341/1745296811_2837658_1352530283_f404ea39053b4559701892a285d64eb6_rle_crop_3762519385_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/d9a5a908c7ee9c670a65ca0ccf3102c8_60927103.png imagette222858641745297341 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22285832 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22285869,22285870,22285871,22285872,22285873,22285874,22285875,22285876,22285877,22285878,22285879,22285880?tags=plastique,kraft,Carton_gris,papier,Teint_Dans_La_Masse,flou,autre_refus,Carton_brun,mal_croppe,cartonnette,environnement,metal your option no_mail is active, we will not send the real mail to your client args[1352530712] : ('0.05518727894071494',) no score found for photo 1352530712 We are sending mail with results at report@fotonower.com refus_total : 0.05518727894071494 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=22285832 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_P22285832_22-04-2025_06_48_58.pdf results_Auto_P22285832_22-04-2025_06_48_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285832_22-04-2025_06_48_58.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','22285832','results_Auto_P22285832_22-04-2025_06_48_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285832_22-04-2025_06_48_58.pdf','pdf','','0.15','0.05518727894071494') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22285832]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1352530712] map_info['map_portfolio_photo'] : {22285832: [1352530712, 1352530665, 1352530663, 1352530660, 1352530657, 1352530631, 1352530628, 1352530624, 1352530620, 1352530617, 1352530613, 1352530584, 1352530581, 1352530579, 1352530552, 1352530548, 1352530545, 1352530542, 1352530537, 1352530503, 1352530498, 1352530493, 1352530491, 1352530489, 1352530484, 1352530437, 1352530434, 1352530431, 1352530428, 1352530396, 1352530391, 1352530389, 1352530387, 1352530363, 1352530358, 1352530354, 1352530351, 1352530348, 1352530345, 1352530310, 1352530307, 1352530304, 1352530302, 1352530283, 1352530278, 1352530274, 1352530268, 1352530260, 1352530226, 1352530223, 1352530221, 1352530219, 1352530216, 1352530191, 1352530187, 1352530183, 1352530180, 1352530176, 1352530140, 1352530136, 1352530133, 1352530131, 1352530129, 1352530126, 1352530091, 1352530086, 1352530083, 1352530080, 1352530073, 1352530029]} final : False mtd_id 4302 list_pids : [1352530712] 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, '2746851') ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22285832', '1352530712', None, None, None, None, None, '2746851')] time used for this insertion : 0.012153148651123047 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.03841757774353 time spend to save output : 0.012285470962524414 total time spend for step 4 : 4.050703048706055 step5:split_time_score Tue Apr 22 06:49:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22285832'] 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 : [('22285832',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22285832) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1352530712: {'path': 'temp/1745297338_1543050_1352530712_ea99096352a202e9cc42848c0be53b6c.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 = 22285832; (('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 = 22285832 group by h (('06', 70),) 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=22285832 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 (22285832) 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 (22285832) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 22042025 22285832 Nombre de photos uploadées : 70 / 23040 (0%) 22042025 22285832 Nombre de photos taguées (types de déchets): 0 / 70 (0%) 22042025 22285832 Nombre de photos taguées (volume) : 0 / 70 (0%) [{'photo_id': 1352530029, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/25b91cf50195008b521e1b9acbb028c4.jpg', 'username': None, 'uploaded_at': 1745296267, 'text': 'image_22042025_06_30_33_010132m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1352530091, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/9d7c128cc96a8e2d5266fbcce24072e8.jpg', 'username': None, 'uploaded_at': 1745296327, 'text': 'image_22042025_06_30_53_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1352530086, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/dbb8c6e8676116feb281bb2b98c4044b.jpg', 'username': None, 'uploaded_at': 1745296327, 'text': 'image_22042025_06_31_04_010146m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1352530083, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/22/90923c28a26f5369e3dd5d8f05e792de.jpg', 'username': None, 'uploaded_at': 1745296327, 'text': 'image_22042025_06_31_14_010135m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 8.821487426757812e-06 ?????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.004123210906982422 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22285832, '2025-04-22' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1735821,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.021889686584472656 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= 1735821 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1735821, 'dashboard_run_id': 1743890, 'mtr_portfolio_id': 22285051, 'dashboard_result_id': 10015366, '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_P22285051_22-04-2025_06_26_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285052, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285054, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285060, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285062, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285063, 'pht': 3726}}"}, {'dashboat_entry_day': 1735821, 'dashboard_run_id': 1743890, 'mtr_portfolio_id': 22285528, 'dashboard_result_id': 10015367, '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_P22285528_22-04-2025_06_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285554, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285555, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285560, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285562, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285563, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285564, 'pht': 3726}}"}, {'dashboat_entry_day': 1735821, 'dashboard_run_id': 1743890, 'mtr_portfolio_id': 22285832, 'dashboard_result_id': 10015368, '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_P22285832_22-04-2025_06_46_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285859, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285861, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285863, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285867, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285868, 'pht': 3726}}"}, {'dashboat_entry_day': 1735821, 'dashboard_run_id': 1743890, 'mtr_portfolio_id': 22286020, 'dashboard_result_id': 10015369, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22285051 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': 2746787, 'mtr_portfolio_id': 22285051, 'created_at': datetime.datetime(2025, 4, 22, 6, 26, 58), 'result': '0.04686188925972202', 'result_long': None, 'result_double': None}] Qualite : 0.04686188925972202 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22285051 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285051_22-04-2025_06_26_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22285051 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_P22285051_22-04-2025_06_26_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285052, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285054, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285060, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285062, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285063, 'pht': 3726}}" where mtr_portfolio_id = 22285051 and dashboard_run_id = 1743890 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`=22285051 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10015366, 0.04686188925972202, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285051_22-04-2025_06_26_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285052, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285054, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285060, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285062, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285063, '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 = 22285528 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': 2746828, 'mtr_portfolio_id': 22285528, 'created_at': datetime.datetime(2025, 4, 22, 6, 32, 58), 'result': '0.04923531327927505', 'result_long': None, 'result_double': None}] Qualite : 0.04923531327927505 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22285528 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285528_22-04-2025_06_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22285528 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_P22285528_22-04-2025_06_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285554, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285555, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285560, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285562, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285563, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285564, 'pht': 3726}}" where mtr_portfolio_id = 22285528 and dashboard_run_id = 1743890 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`=22285528 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10015367, 0.04923531327927505, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285528_22-04-2025_06_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285554, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285555, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285557, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285560, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285562, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285563, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285564, '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 = 22285832 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': 2746851, 'mtr_portfolio_id': 22285832, 'created_at': datetime.datetime(2025, 4, 22, 6, 48, 57), 'result': '0.05518727894071494', 'result_long': None, 'result_double': None}] Qualite : 0.05518727894071494 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22285832 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285832_22-04-2025_06_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22285832 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_P22285832_22-04-2025_06_48_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285859, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285861, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285863, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285867, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285868, 'pht': 3726}}" where mtr_portfolio_id = 22285832 and dashboard_run_id = 1743890 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`=22285832 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10015368, 0.05518727894071494, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22285832_22-04-2025_06_48_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22285857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22285858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22285859, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22285860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22285861, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22285862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22285863, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22285864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22285865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22285866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22285867, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22285868, '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 = 22286020 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 = 22286020 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 = 22286020 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%22286020%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22286020 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 = 22286020 and dashboard_run_id = 1743890 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22285051,22285528,22285832,22286020) result : ((1352527149,), (1352528950,), (1352528954,), (1352528956,), (1352528959,), (1352528980,), (1352528982,), (1352528984,), (1352528986,), (1352528988,), (1352529021,), (1352529023,), (1352529025,), (1352529056,), (1352529058,), (1352529060,), (1352529062,), (1352529064,), (1352529067,), (1352529086,), (1352529088,), (1352529090,), (1352529092,), (1352529111,), (1352529113,), (1352529115,), (1352529117,), (1352529120,), (1352529405,), (1352529407,), (1352529431,), (1352529434,), (1352529439,), (1352529442,), (1352529446,), (1352529448,), (1352529489,), (1352529474,), (1352529483,), (1352529486,), (1352529511,), (1352529516,), (1352529518,), (1352529522,), (1352529545,), (1352529549,), (1352529551,), (1352529582,), (1352529585,), (1352529587,), (1352529590,), (1352529612,), (1352529615,), (1352529617,), (1352529619,), (1352529647,), (1352529649,), (1352529651,), (1352529653,), (1352529677,), (1352529680,), (1352529683,), (1352529690,), (1352529696,), (1352529699,), (1352529718,), (1352529722,), (1352529724,), (1352529726,), (1352529730,), (1352529732,), (1352529757,), (1352529759,), (1352529761,), (1352529787,), (1352529790,), (1352529792,), (1352529793,), (1352529798,), (1352529823,), (1352529825,), (1352529828,), (1352529831,), (1352529833,), (1352529851,), (1352529853,), (1352529856,), (1352529858,), (1352529890,), (1352529892,), (1352529894,), (1352529914,), (1352529917,), (1352529919,), (1352529923,), (1352529936,), (1352529943,), (1352529969,), (1352529978,), (1352529981,), (1352529984,), (1352529988,), (1352530031,), (1352530029,), (1352530073,), (1352530080,), (1352530083,), (1352530086,), (1352530091,), (1352530126,), (1352530129,), (1352530131,), (1352530133,), (1352530136,), (1352530140,), (1352530176,), (1352530180,), (1352530183,), (1352530187,), (1352530191,), (1352530216,), (1352530219,), (1352530221,), (1352530223,), (1352530226,), (1352530260,), (1352530268,), (1352530274,), (1352530278,), (1352530283,), (1352530302,), (1352530304,), (1352530307,), (1352530310,), (1352530345,), (1352530348,), (1352530351,), (1352530354,), (1352530358,), (1352530363,), (1352530387,), (1352530389,), (1352530391,), (1352530396,), (1352530428,), (1352530431,), (1352530434,), (1352530437,), (1352530484,), (1352530489,), (1352530491,), (1352530493,), (1352530498,), (1352530503,), (1352530537,), (1352530542,), (1352530545,), (1352530548,), (1352530552,), (1352530579,), (1352530581,), (1352530584,), (1352530613,), (1352530617,), (1352530620,), (1352530624,), (1352530628,), (1352530631,), (1352530657,), (1352530660,), (1352530663,), (1352530665,), (1352530712,), (1352530695,), (1352530698,), (1352530702,), (1352530705,), (1352530709,), (1352530730,), (1352530733,), (1352530735,), (1352530737,), (1352530740,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'22042025': {'nb_upload': 70, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22285832]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1352530712] map_info['map_portfolio_photo'] : {22285832: [1352530712, 1352530665, 1352530663, 1352530660, 1352530657, 1352530631, 1352530628, 1352530624, 1352530620, 1352530617, 1352530613, 1352530584, 1352530581, 1352530579, 1352530552, 1352530548, 1352530545, 1352530542, 1352530537, 1352530503, 1352530498, 1352530493, 1352530491, 1352530489, 1352530484, 1352530437, 1352530434, 1352530431, 1352530428, 1352530396, 1352530391, 1352530389, 1352530387, 1352530363, 1352530358, 1352530354, 1352530351, 1352530348, 1352530345, 1352530310, 1352530307, 1352530304, 1352530302, 1352530283, 1352530278, 1352530274, 1352530268, 1352530260, 1352530226, 1352530223, 1352530221, 1352530219, 1352530216, 1352530191, 1352530187, 1352530183, 1352530180, 1352530176, 1352530140, 1352530136, 1352530133, 1352530131, 1352530129, 1352530126, 1352530091, 1352530086, 1352530083, 1352530080, 1352530073, 1352530029]} final : True mtd_id 4302 list_pids : [1352530712] Looping around the photos to save general results len do output : 1 /22285832Didn'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, '2746851') ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22285832', 'None', None, None, None, None, '2746851'), ('4302', '22285832', '1352530712', None, None, None, None, None, '2746851')] time used for this insertion : 0.0133056640625 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1372020244598389 time spend to save output : 0.013530492782592773 total time spend for step 5 : 1.1507325172424316 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 (2746851) 2.01user 2.63system 0:09.32elapsed 49%CPU (0avgtext+0avgdata 157444maxresident)k 232inputs+6416outputs (3major+61917minor)pagefaults 0swaps