--- tags: decompiler --- # MWEs 1: 21-27 Note: - Python versions are selected based on the original pyc (Using command `file`) - MWEs generated will be compiled using `compileall` via the same python version ## Error 1/21 Source: [link](https://github.com/geigerzaehler/beets-check/blob/801a50af0f05076928c35fd1086dcb75aa9a3f89/beetsplug/check.py#L131) Python version: 3.8 Decompyle3: Failed Uncompyle6: Failed Error: `Deparsing stopped due to parse error` | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass | Pass | Pass | ### MWE: ```python= def copy_original_checksum(): for replaced in l: try: pass except: continue ``` ### Closest Solution: No solution. Check [here](https://hackmd.io/Pnoy0j14Qy2172yNDlYF2A?view#MWE-2) #### MWE data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object copy_original_checksum at 0x40021aebe0, file "main.py", line 1>) 2 LOAD_CONST 1 ('copy_original_checksum') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (copy_original_checksum) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object copy_original_checksum at 0x40021aebe0, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (l) 2 GET_ITER >> 4 FOR_ITER 26 (to 32) 6 STORE_FAST 0 (replaced) 3 8 SETUP_FINALLY 4 (to 14) 4 10 POP_BLOCK 12 JUMP_ABSOLUTE 4 5 >> 14 POP_TOP 16 POP_TOP 18 POP_TOP 6 20 POP_EXCEPT 22 JUMP_ABSOLUTE 4 24 POP_EXCEPT 26 JUMP_ABSOLUTE 4 28 END_FINALLY 30 JUMP_ABSOLUTE 4 >> 32 LOAD_CONST 0 (None) 34 RETURN_VALUE ``` Output uncompyle6: ```python= def copy_original_checksum--- This code section failed: --- L. 2 0 LOAD_GLOBAL l 2 GET_ITER 4 FOR_ITER 32 'to 32' 6 STORE_FAST 'replaced' L. 3 8 SETUP_FINALLY 14 'to 14' L. 4 10 POP_BLOCK 12 JUMP_BACK 4 'to 4' 14_0 COME_FROM_FINALLY 8 '8' L. 5 14 POP_TOP 16 POP_TOP 18 POP_TOP L. 6 20 POP_EXCEPT 22 JUMP_BACK 4 'to 4' 24 POP_EXCEPT 26 JUMP_BACK 4 'to 4' 28 END_FINALLY 30 JUMP_BACK 4 'to 4' Parse error at or near `POP_EXCEPT' instruction at offset 24 ``` Output Decompyle3: ```python= Instruction context: L. 6 20 POP_EXCEPT -> 22 JUMP_BACK 4 'to 4' 24 POP_EXCEPT 26 JUMP_BACK 4 'to 4' 28 END_FINALLY 30 JUMP_BACK 4 'to 4' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` ## Error 1/22 Source: [link](https://github.com/rabix/benten/blob/543157cc5215615a5623ac12bbbe8bcd8e27d43d/benten/code/workflow.py#L210) Python version: 3.7 Decompyle3: Successful Uncompyle6: Failed Error: `Deparsing stopped due to parse error` | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Pass | Fail | Pass | Pass | ### MWE: ```python= def _validate_source(): if a: for x in rng: foo() elif b: foo() ``` #### Closest Solution: ```python= def _validate_source(): if a: for x in rng: foo() if b and not a: foo() ``` ```c= 1 0 LOAD_CONST 0 (<code object _validate_source at 0x40022eee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_validate_source') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_validate_source) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _validate_source at 0x40022eee40, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (a) 2 POP_JUMP_IF_FALSE 24 3 4 SETUP_LOOP 18 (to 24) 6 LOAD_GLOBAL 1 (rng) 8 GET_ITER >> 10 FOR_ITER 10 (to 22) 12 STORE_FAST 0 (x) 4 14 LOAD_GLOBAL 2 (foo) 16 CALL_FUNCTION 0 18 POP_TOP 20 JUMP_ABSOLUTE 10 >> 22 POP_BLOCK 5 >> 24 LOAD_GLOBAL 3 (b) 26 POP_JUMP_IF_FALSE 38 28 LOAD_GLOBAL 0 (a) 30 POP_JUMP_IF_TRUE 38 6 32 LOAD_GLOBAL 2 (foo) 34 CALL_FUNCTION 0 36 POP_TOP >> 38 LOAD_CONST 0 (None) 40 RETURN_VALUE ``` #### MWE data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object _validate_source at 0x40022aee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_validate_source') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_validate_source) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _validate_source at 0x40022aee40, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (a) 2 POP_JUMP_IF_FALSE 26 3 4 SETUP_LOOP 30 (to 36) 6 LOAD_GLOBAL 1 (rng) 8 GET_ITER >> 10 FOR_ITER 10 (to 22) 12 STORE_FAST 0 (x) 4 14 LOAD_GLOBAL 2 (foo) 16 CALL_FUNCTION 0 18 POP_TOP 20 JUMP_ABSOLUTE 10 >> 22 POP_BLOCK 24 JUMP_FORWARD 10 (to 36) 5 >> 26 LOAD_GLOBAL 3 (b) 28 POP_JUMP_IF_FALSE 36 6 30 LOAD_GLOBAL 2 (foo) 32 CALL_FUNCTION 0 34 POP_TOP >> 36 LOAD_CONST 0 (None) 38 RETURN_VALUE ``` Output uncompyle6: ```python= def _validate_source--- This code section failed: --- L. 2 0 LOAD_GLOBAL a 2 POP_JUMP_IF_FALSE 26 'to 26' L. 3 4 SETUP_LOOP 36 'to 36' 6 LOAD_GLOBAL rng 8 GET_ITER 10 FOR_ITER 22 'to 22' 12 STORE_FAST 'x' L. 4 14 LOAD_GLOBAL foo 16 CALL_FUNCTION_0 0 '0 positional arguments' 18 POP_TOP 20 JUMP_BACK 10 'to 10' 22 POP_BLOCK 24 JUMP_FORWARD 36 'to 36' 26_0 COME_FROM 2 '2' L. 5 26 LOAD_GLOBAL b 28 POP_JUMP_IF_FALSE 36 'to 36' L. 6 30 LOAD_GLOBAL foo 32 CALL_FUNCTION_0 0 '0 positional arguments' 34 POP_TOP 36_0 COME_FROM 28 '28' 36_1 COME_FROM 24 '24' 36_2 COME_FROM_LOOP 4 '4' Parse error at or near `COME_FROM' instruction at offset 36_1 ``` Output Decompyle3: ```python= def _validate_source(): if a: for x in rng: foo() elif b: foo() ``` ## Error 1/23 Source: [link](https://github.com/rabix/benten/blob/543157cc5215615a5623ac12bbbe8bcd8e27d43d/benten/cwl/typeinference.py#L12) Python version: 3.7 Decompyle3: Failed Uncompyle6: Failed Error: `Deparsing stopped due to parse error` | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Pass/Incorrect | Fail | Pass | Pass | ### MWE: ```python= def infer_type(): for tcr in type_check_results: if tcr.match == Match.Yes: break else: for tcr in type_check_results: if tcr.match == Match.Maybe: break else: if len(type_check_results) == 1: res = 2 else: res = 1 return res ``` #### Closest Solution: ```python= def infer_type(): x = False for tcr in type_check_results: if tcr.match == Match.Yes: x = True break if not x: x = False for tcr in type_check_results: if tcr.match == Match.Maybe: x = True break if not x: if len(type_check_results) == 1: res = 2 else: res = 1 return res ``` ```c= 1 0 LOAD_CONST 0 (<code object infer_type at 0x40022aef60, file "main.py", line 1>) 2 LOAD_CONST 1 ('infer_type') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (infer_type) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object infer_type at 0x40022aef60, file "main.py", line 1>: 2 0 LOAD_CONST 1 (False) 2 STORE_FAST 0 (x) 3 4 SETUP_LOOP 30 (to 36) 6 LOAD_GLOBAL 0 (type_check_results) 8 GET_ITER >> 10 FOR_ITER 22 (to 34) 12 STORE_FAST 1 (tcr) 4 14 LOAD_FAST 1 (tcr) 16 LOAD_ATTR 1 (match) 18 LOAD_GLOBAL 2 (Match) 20 LOAD_ATTR 3 (Yes) 22 COMPARE_OP 2 (==) 24 POP_JUMP_IF_FALSE 10 5 26 LOAD_CONST 2 (True) 28 STORE_FAST 0 (x) 6 30 BREAK_LOOP 32 JUMP_ABSOLUTE 10 >> 34 POP_BLOCK 7 >> 36 LOAD_FAST 0 (x) 38 POP_JUMP_IF_TRUE 102 8 40 LOAD_CONST 1 (False) 42 STORE_FAST 0 (x) 9 44 SETUP_LOOP 30 (to 76) 46 LOAD_GLOBAL 0 (type_check_results) 48 GET_ITER >> 50 FOR_ITER 22 (to 74) 52 STORE_FAST 1 (tcr) 10 54 LOAD_FAST 1 (tcr) 56 LOAD_ATTR 1 (match) 58 LOAD_GLOBAL 2 (Match) 60 LOAD_ATTR 4 (Maybe) 62 COMPARE_OP 2 (==) 64 POP_JUMP_IF_FALSE 50 11 66 LOAD_CONST 2 (True) 68 STORE_FAST 0 (x) 12 70 BREAK_LOOP 72 JUMP_ABSOLUTE 50 >> 74 POP_BLOCK 13 >> 76 LOAD_FAST 0 (x) 78 POP_JUMP_IF_TRUE 102 14 80 LOAD_GLOBAL 5 (len) 82 LOAD_GLOBAL 0 (type_check_results) 84 CALL_FUNCTION 1 86 LOAD_CONST 3 (1) 88 COMPARE_OP 2 (==) 90 POP_JUMP_IF_FALSE 98 15 92 LOAD_CONST 4 (2) 94 STORE_FAST 2 (res) 96 JUMP_FORWARD 4 (to 102) 17 >> 98 LOAD_CONST 3 (1) 100 STORE_FAST 2 (res) 18 >> 102 LOAD_FAST 2 (res) 104 RETURN_VALUE ``` #### MWE data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object infer_type at 0x40022aee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('infer_type') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (infer_type) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object infer_type at 0x40022aee40, file "main.py", line 1>: 2 0 SETUP_LOOP 76 (to 78) 2 LOAD_GLOBAL 0 (type_check_results) 4 GET_ITER >> 6 FOR_ITER 18 (to 26) 8 STORE_FAST 0 (tcr) 3 10 LOAD_FAST 0 (tcr) 12 LOAD_ATTR 1 (match) 14 LOAD_GLOBAL 2 (Match) 16 LOAD_ATTR 3 (Yes) 18 COMPARE_OP 2 (==) 20 POP_JUMP_IF_FALSE 6 4 22 BREAK_LOOP 24 JUMP_ABSOLUTE 6 >> 26 POP_BLOCK 6 28 SETUP_LOOP 48 (to 78) 30 LOAD_GLOBAL 0 (type_check_results) 32 GET_ITER >> 34 FOR_ITER 18 (to 54) 36 STORE_FAST 0 (tcr) 7 38 LOAD_FAST 0 (tcr) 40 LOAD_ATTR 1 (match) 42 LOAD_GLOBAL 2 (Match) 44 LOAD_ATTR 4 (Maybe) 46 COMPARE_OP 2 (==) 48 POP_JUMP_IF_FALSE 34 8 50 BREAK_LOOP 52 JUMP_ABSOLUTE 34 >> 54 POP_BLOCK 10 56 LOAD_GLOBAL 5 (len) 58 LOAD_GLOBAL 0 (type_check_results) 60 CALL_FUNCTION 1 62 LOAD_CONST 1 (1) 64 COMPARE_OP 2 (==) 66 POP_JUMP_IF_FALSE 74 11 68 LOAD_CONST 2 (2) 70 STORE_FAST 1 (res) 72 JUMP_FORWARD 4 (to 78) 13 >> 74 LOAD_CONST 1 (1) 76 STORE_FAST 1 (res) 14 >> 78 LOAD_FAST 1 (res) 80 RETURN_VALUE ``` Output uncompyle6: ```python= def infer_type--- This code section failed: --- L. 2 0 SETUP_LOOP 78 'to 78' 2 LOAD_GLOBAL type_check_results 4 GET_ITER 6_0 COME_FROM 20 '20' 6 FOR_ITER 26 'to 26' 8 STORE_FAST 'tcr' L. 3 10 LOAD_FAST 'tcr' 12 LOAD_ATTR match 14 LOAD_GLOBAL Match 16 LOAD_ATTR Yes 18 COMPARE_OP == 20 POP_JUMP_IF_FALSE 6 'to 6' L. 4 22 BREAK_LOOP 24 JUMP_BACK 6 'to 6' 26 POP_BLOCK L. 6 28 SETUP_LOOP 78 'to 78' 30 LOAD_GLOBAL type_check_results 32 GET_ITER 34_0 COME_FROM 48 '48' 34 FOR_ITER 54 'to 54' 36 STORE_FAST 'tcr' L. 7 38 LOAD_FAST 'tcr' 40 LOAD_ATTR match 42 LOAD_GLOBAL Match 44 LOAD_ATTR Maybe 46 COMPARE_OP == 48 POP_JUMP_IF_FALSE 34 'to 34' L. 8 50 BREAK_LOOP 52 JUMP_BACK 34 'to 34' 54 POP_BLOCK L. 10 56 LOAD_GLOBAL len 58 LOAD_GLOBAL type_check_results 60 CALL_FUNCTION_1 1 '1 positional argument' 62 LOAD_CONST 1 64 COMPARE_OP == 66 POP_JUMP_IF_FALSE 74 'to 74' L. 11 68 LOAD_CONST 2 70 STORE_FAST 'res' 72 JUMP_FORWARD 78 'to 78' 74_0 COME_FROM 66 '66' L. 13 74 LOAD_CONST 1 76 STORE_FAST 'res' 78_0 COME_FROM 72 '72' 78_1 COME_FROM_LOOP 28 '28' 78_2 COME_FROM_LOOP 0 '0' L. 14 78 LOAD_FAST 'res' 80 RETURN_VALUE -1 RETURN_LAST Parse error at or near `LOAD_FAST' instruction at offset 78 ``` Output Decompyle3: ```python= Instruction context: -> L. 14 78 LOAD_FAST 'res' 80 RETURN_VALUE test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` ## Error 1/24 Source: Online code not available. Download source here: [link](https://pypi.org/project/bert-sent-encoding/#files) Python version: 3.7 Decompyle3: Pass - Incorrect Uncompyle6: Failed Error: `Deparsing stopped due to parse error` MWE 1: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Fail | Pass | Pass | MWE 2: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Fail | Pass | Pass | MWE 3: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Fail | Pass | Pass | ### MWE: #### MWE1: ```python= def _is_chinese_char(self, cp): if ((cp >= 0x4E00 and cp <= 0x9FFF) or # (cp >= 0x3400 and cp <= 0x4DBF) or # (cp >= 0x20000 and cp <= 0x2A6DF) or # (cp >= 0x2A700 and cp <= 0x2B73F) or # (cp >= 0x2B740 and cp <= 0x2B81F) or # (cp >= 0x2F800 and cp <= 0x2FA1F)): # return True return False ``` ##### Solution 1: ```python= def _is_chinese_char(self, cp): temp1 = cp >= 0x4E00 and cp <= 0x9FFF temp2 = (cp >= 0x3400 and cp <= 0x4DBF) temp3 = (cp >= 0x20000 and cp <= 0x2A6DF) temp4 = (cp >= 0x2A700 and cp <= 0x2B73F) temp5 = (cp >= 0x2B740 and cp <= 0x2B81F) temp6 = (cp >= 0x2F800 and cp <= 0x2FA1F) if temp1 or temp2 or temp3: # return True if temp4 or temp5 or temp6: return True return False ``` ```c= 1 0 LOAD_CONST 0 (<code object _is_chinese_char at 0x40022eee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_chinese_char') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_chinese_char) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_chinese_char at 0x40022eee40, file "main.py", line 1>: 2 0 LOAD_FAST 1 (cp) 2 LOAD_CONST 1 (19968) 4 COMPARE_OP 5 (>=) 6 JUMP_IF_FALSE_OR_POP 14 8 LOAD_FAST 1 (cp) 10 LOAD_CONST 2 (40959) 12 COMPARE_OP 1 (<=) >> 14 STORE_FAST 2 (temp1) 3 16 LOAD_FAST 1 (cp) 18 LOAD_CONST 3 (13312) 20 COMPARE_OP 5 (>=) 22 JUMP_IF_FALSE_OR_POP 30 24 LOAD_FAST 1 (cp) 26 LOAD_CONST 4 (19903) 28 COMPARE_OP 1 (<=) >> 30 STORE_FAST 3 (temp2) 4 32 LOAD_FAST 1 (cp) 34 LOAD_CONST 5 (131072) 36 COMPARE_OP 5 (>=) 38 JUMP_IF_FALSE_OR_POP 46 40 LOAD_FAST 1 (cp) 42 LOAD_CONST 6 (173791) 44 COMPARE_OP 1 (<=) >> 46 STORE_FAST 4 (temp3) 5 48 LOAD_FAST 1 (cp) 50 LOAD_CONST 7 (173824) 52 COMPARE_OP 5 (>=) 54 JUMP_IF_FALSE_OR_POP 62 56 LOAD_FAST 1 (cp) 58 LOAD_CONST 8 (177983) 60 COMPARE_OP 1 (<=) >> 62 STORE_FAST 5 (temp4) 6 64 LOAD_FAST 1 (cp) 66 LOAD_CONST 9 (177984) 68 COMPARE_OP 5 (>=) 70 JUMP_IF_FALSE_OR_POP 78 72 LOAD_FAST 1 (cp) 74 LOAD_CONST 10 (178207) 76 COMPARE_OP 1 (<=) >> 78 STORE_FAST 6 (temp5) 7 80 LOAD_FAST 1 (cp) 82 LOAD_CONST 11 (194560) 84 COMPARE_OP 5 (>=) 86 JUMP_IF_FALSE_OR_POP 94 88 LOAD_FAST 1 (cp) 90 LOAD_CONST 12 (195103) 92 COMPARE_OP 1 (<=) >> 94 STORE_FAST 7 (temp6) 8 96 LOAD_FAST 2 (temp1) 98 POP_JUMP_IF_TRUE 108 100 LOAD_FAST 3 (temp2) 102 POP_JUMP_IF_TRUE 108 104 LOAD_FAST 4 (temp3) 106 POP_JUMP_IF_FALSE 112 9 >> 108 LOAD_CONST 13 (True) 110 RETURN_VALUE 10 >> 112 LOAD_FAST 5 (temp4) 114 POP_JUMP_IF_TRUE 124 116 LOAD_FAST 6 (temp5) 118 POP_JUMP_IF_TRUE 124 120 LOAD_FAST 7 (temp6) 122 POP_JUMP_IF_FALSE 128 11 >> 124 LOAD_CONST 13 (True) 126 RETURN_VALUE 12 >> 128 LOAD_CONST 14 (False) 130 RETURN_VALUE ``` ##### MWE1 data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object _is_chinese_char at 0x40022eef60, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_chinese_char') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_chinese_char) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_chinese_char at 0x40022eef60, file "main.py", line 1>: 2 0 LOAD_FAST 1 (cp) 2 LOAD_CONST 1 (19968) 4 COMPARE_OP 5 (>=) 6 POP_JUMP_IF_FALSE 16 8 LOAD_FAST 1 (cp) 10 LOAD_CONST 2 (40959) 12 COMPARE_OP 1 (<=) 14 POP_JUMP_IF_TRUE 96 3 >> 16 LOAD_FAST 1 (cp) 18 LOAD_CONST 3 (13312) 20 COMPARE_OP 5 (>=) 22 POP_JUMP_IF_FALSE 32 24 LOAD_FAST 1 (cp) 26 LOAD_CONST 4 (19903) 28 COMPARE_OP 1 (<=) 30 POP_JUMP_IF_TRUE 96 4 >> 32 LOAD_FAST 1 (cp) 34 LOAD_CONST 5 (131072) 36 COMPARE_OP 5 (>=) 38 POP_JUMP_IF_FALSE 48 40 LOAD_FAST 1 (cp) 42 LOAD_CONST 6 (173791) 44 COMPARE_OP 1 (<=) 46 POP_JUMP_IF_TRUE 96 5 >> 48 LOAD_FAST 1 (cp) 50 LOAD_CONST 7 (173824) 52 COMPARE_OP 5 (>=) 54 POP_JUMP_IF_FALSE 64 56 LOAD_FAST 1 (cp) 58 LOAD_CONST 8 (177983) 60 COMPARE_OP 1 (<=) 62 POP_JUMP_IF_TRUE 96 6 >> 64 LOAD_FAST 1 (cp) 66 LOAD_CONST 9 (177984) 68 COMPARE_OP 5 (>=) 70 POP_JUMP_IF_FALSE 80 72 LOAD_FAST 1 (cp) 74 LOAD_CONST 10 (178207) 76 COMPARE_OP 1 (<=) 78 POP_JUMP_IF_TRUE 96 7 >> 80 LOAD_FAST 1 (cp) 82 LOAD_CONST 11 (194560) 84 COMPARE_OP 5 (>=) 86 POP_JUMP_IF_FALSE 100 88 LOAD_FAST 1 (cp) 90 LOAD_CONST 12 (195103) 92 COMPARE_OP 1 (<=) 94 POP_JUMP_IF_FALSE 100 8 >> 96 LOAD_CONST 13 (True) 98 RETURN_VALUE 10 >> 100 LOAD_CONST 14 (False) 102 RETURN_VALUE ``` Output uncompyle6: ```python= def _is_chinese_char--- This code section failed: --- L. 2 0 LOAD_FAST 'cp' 2 LOAD_CONST 19968 4 COMPARE_OP >= 6 POP_JUMP_IF_FALSE 16 'to 16' 8 LOAD_FAST 'cp' 10 LOAD_CONST 40959 12 COMPARE_OP <= 14 POP_JUMP_IF_TRUE 96 'to 96' 16_0 COME_FROM 6 '6' L. 3 16 LOAD_FAST 'cp' 18 LOAD_CONST 13312 20 COMPARE_OP >= 22 POP_JUMP_IF_FALSE 32 'to 32' 24 LOAD_FAST 'cp' 26 LOAD_CONST 19903 28 COMPARE_OP <= 30 POP_JUMP_IF_TRUE 96 'to 96' 32_0 COME_FROM 22 '22' L. 4 32 LOAD_FAST 'cp' 34 LOAD_CONST 131072 36 COMPARE_OP >= 38 POP_JUMP_IF_FALSE 48 'to 48' 40 LOAD_FAST 'cp' 42 LOAD_CONST 173791 44 COMPARE_OP <= 46 POP_JUMP_IF_TRUE 96 'to 96' 48_0 COME_FROM 38 '38' L. 5 48 LOAD_FAST 'cp' 50 LOAD_CONST 173824 52 COMPARE_OP >= 54 POP_JUMP_IF_FALSE 64 'to 64' 56 LOAD_FAST 'cp' 58 LOAD_CONST 177983 60 COMPARE_OP <= 62 POP_JUMP_IF_TRUE 96 'to 96' 64_0 COME_FROM 54 '54' L. 6 64 LOAD_FAST 'cp' 66 LOAD_CONST 177984 68 COMPARE_OP >= 70 POP_JUMP_IF_FALSE 80 'to 80' 72 LOAD_FAST 'cp' 74 LOAD_CONST 178207 76 COMPARE_OP <= 78 POP_JUMP_IF_TRUE 96 'to 96' 80_0 COME_FROM 70 '70' L. 7 80 LOAD_FAST 'cp' 82 LOAD_CONST 194560 84 COMPARE_OP >= 86 POP_JUMP_IF_FALSE 100 'to 100' 88 LOAD_FAST 'cp' 90 LOAD_CONST 195103 92 COMPARE_OP <= 94 POP_JUMP_IF_FALSE 100 'to 100' 96_0 COME_FROM 78 '78' 96_1 COME_FROM 62 '62' 96_2 COME_FROM 46 '46' 96_3 COME_FROM 30 '30' 96_4 COME_FROM 14 '14' L. 8 96 LOAD_CONST True 98 RETURN_VALUE 100_0 COME_FROM 94 '94' 100_1 COME_FROM 86 '86' L. 10 100 LOAD_CONST False 102 RETURN_VALUE -1 RETURN_LAST Parse error at or near `COME_FROM' instruction at offset 100_1 ``` Output Decompyle3: ```python= def _is_chinese_char(self, cp): if not (cp >= 19968 and cp <= 40959): if cp >= 13312 and not cp <= 19903: if cp >= 131072 and not cp <= 173791: if cp >= 173824 and not cp <= 177983: if cp >= 177984 and not cp <= 178207: if not cp >= 194560 or cp <= 195103: return True return False ``` #### MWE2: ```python= def _is_whitespace(char): if char == " " or char == "\t" or char == "\n" or char == "\r": return True if cat == "Zs": return True return False ``` ##### Solution 2: ```python= def _is_whitespace(char): temp1 = char == " " or char == "\t" if temp1 or char == "\n" or char == "\r": return True if cat == "Zs": return True return False ``` ```c= 1 0 LOAD_CONST 0 (<code object _is_whitespace at 0x40022eee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_whitespace') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_whitespace) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_whitespace at 0x40022eee40, file "main.py", line 1>: 2 0 LOAD_FAST 0 (char) 2 LOAD_CONST 1 (' ') 4 COMPARE_OP 2 (==) 6 JUMP_IF_TRUE_OR_POP 14 8 LOAD_FAST 0 (char) 10 LOAD_CONST 2 ('\t') 12 COMPARE_OP 2 (==) >> 14 STORE_FAST 1 (temp1) 3 16 LOAD_FAST 1 (temp1) 18 POP_JUMP_IF_TRUE 36 20 LOAD_FAST 0 (char) 22 LOAD_CONST 3 ('\n') 24 COMPARE_OP 2 (==) 26 POP_JUMP_IF_TRUE 36 28 LOAD_FAST 0 (char) 30 LOAD_CONST 4 ('\r') 32 COMPARE_OP 2 (==) 34 POP_JUMP_IF_FALSE 40 4 >> 36 LOAD_CONST 5 (True) 38 RETURN_VALUE 5 >> 40 LOAD_GLOBAL 0 (cat) 42 LOAD_CONST 6 ('Zs') 44 COMPARE_OP 2 (==) 46 POP_JUMP_IF_FALSE 52 6 48 LOAD_CONST 5 (True) 50 RETURN_VALUE 7 >> 52 LOAD_CONST 7 (False) 54 RETURN_VALUE ``` ##### MWE2 data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object _is_whitespace at 0x40022eee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_whitespace') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_whitespace) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_whitespace at 0x40022eee40, file "main.py", line 1>: 2 0 LOAD_FAST 0 (char) 2 LOAD_CONST 1 (' ') 4 COMPARE_OP 2 (==) 6 POP_JUMP_IF_TRUE 32 8 LOAD_FAST 0 (char) 10 LOAD_CONST 2 ('\t') 12 COMPARE_OP 2 (==) 14 POP_JUMP_IF_TRUE 32 16 LOAD_FAST 0 (char) 18 LOAD_CONST 3 ('\n') 20 COMPARE_OP 2 (==) 22 POP_JUMP_IF_TRUE 32 24 LOAD_FAST 0 (char) 26 LOAD_CONST 4 ('\r') 28 COMPARE_OP 2 (==) 30 POP_JUMP_IF_FALSE 36 3 >> 32 LOAD_CONST 5 (True) 34 RETURN_VALUE 4 >> 36 LOAD_GLOBAL 0 (cat) 38 LOAD_CONST 6 ('Zs') 40 COMPARE_OP 2 (==) 42 POP_JUMP_IF_FALSE 48 5 44 LOAD_CONST 5 (True) 46 RETURN_VALUE 6 >> 48 LOAD_CONST 7 (False) 50 RETURN_VALUE ``` Output uncompyle6: ```python= def _is_whitespace--- This code section failed: --- L. 2 0 LOAD_FAST 'char' 2 LOAD_STR ' ' 4 COMPARE_OP == 6 POP_JUMP_IF_TRUE 32 'to 32' 8 LOAD_FAST 'char' 10 LOAD_STR '\t' 12 COMPARE_OP == 14 POP_JUMP_IF_TRUE 32 'to 32' 16 LOAD_FAST 'char' 18 LOAD_STR '\n' 20 COMPARE_OP == 22 POP_JUMP_IF_TRUE 32 'to 32' 24 LOAD_FAST 'char' 26 LOAD_STR '\r' 28 COMPARE_OP == 30 POP_JUMP_IF_FALSE 36 'to 36' 32_0 COME_FROM 22 '22' 32_1 COME_FROM 14 '14' 32_2 COME_FROM 6 '6' L. 3 32 LOAD_CONST True 34 RETURN_VALUE 36_0 COME_FROM 30 '30' L. 4 36 LOAD_GLOBAL cat 38 LOAD_STR 'Zs' 40 COMPARE_OP == 42 POP_JUMP_IF_FALSE 48 'to 48' L. 5 44 LOAD_CONST True 46 RETURN_VALUE 48_0 COME_FROM 42 '42' L. 6 48 LOAD_CONST False 50 RETURN_VALUE -1 RETURN_LAST Parse error at or near `RETURN_VALUE' instruction at offset 50 ``` Output Decompyle3: ```python= def _is_whitespace(char): if not char == ' ': if char == '\t' or (char == '\n' or char == '\r'): return True if cat == 'Zs': return True return False ``` #### MWE3: ```python= def _is_punctuation(): if ((cp >= 33 and cp <= 47) or (cp >= 58 and cp <= 64) or (cp >= 91 and cp <= 96) or (cp >= 123 and cp <= 126)): return True if cp: return True return False ``` ##### Solution 3: ```python= def _is_punctuation(): temp1 = (cp >= 33 and cp <= 47) temp2 = (cp >= 58 and cp <= 64) temp3 = (cp >= 91 and cp <= 96) temp4 = (cp >= 123 and cp <= 126) if (temp1 or temp2 or temp3): return True if (temp4): return True if cp: return True return False ``` ```c= 1 0 LOAD_CONST 0 (<code object _is_punctuation at 0x40022aee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_punctuation') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_punctuation) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_punctuation at 0x40022aee40, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (cp) 2 LOAD_CONST 1 (33) 4 COMPARE_OP 5 (>=) 6 JUMP_IF_FALSE_OR_POP 14 8 LOAD_GLOBAL 0 (cp) 10 LOAD_CONST 2 (47) 12 COMPARE_OP 1 (<=) >> 14 STORE_FAST 0 (temp1) 3 16 LOAD_GLOBAL 0 (cp) 18 LOAD_CONST 3 (58) 20 COMPARE_OP 5 (>=) 22 JUMP_IF_FALSE_OR_POP 30 24 LOAD_GLOBAL 0 (cp) 26 LOAD_CONST 4 (64) 28 COMPARE_OP 1 (<=) >> 30 STORE_FAST 1 (temp2) 4 32 LOAD_GLOBAL 0 (cp) 34 LOAD_CONST 5 (91) 36 COMPARE_OP 5 (>=) 38 JUMP_IF_FALSE_OR_POP 46 40 LOAD_GLOBAL 0 (cp) 42 LOAD_CONST 6 (96) 44 COMPARE_OP 1 (<=) >> 46 STORE_FAST 2 (temp3) 5 48 LOAD_GLOBAL 0 (cp) 50 LOAD_CONST 7 (123) 52 COMPARE_OP 5 (>=) 54 JUMP_IF_FALSE_OR_POP 62 56 LOAD_GLOBAL 0 (cp) 58 LOAD_CONST 8 (126) 60 COMPARE_OP 1 (<=) >> 62 STORE_FAST 3 (temp4) 6 64 LOAD_FAST 0 (temp1) 66 POP_JUMP_IF_TRUE 76 68 LOAD_FAST 1 (temp2) 70 POP_JUMP_IF_TRUE 76 72 LOAD_FAST 2 (temp3) 74 POP_JUMP_IF_FALSE 80 7 >> 76 LOAD_CONST 9 (True) 78 RETURN_VALUE 8 >> 80 LOAD_FAST 3 (temp4) 82 POP_JUMP_IF_FALSE 88 9 84 LOAD_CONST 9 (True) 86 RETURN_VALUE 10 >> 88 LOAD_GLOBAL 0 (cp) 90 POP_JUMP_IF_FALSE 96 11 92 LOAD_CONST 9 (True) 94 RETURN_VALUE 12 >> 96 LOAD_CONST 10 (False) 98 RETURN_VALUE ``` ##### MWE3 data Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object _is_punctuation at 0x40022aee40, file "main.py", line 1>) 2 LOAD_CONST 1 ('_is_punctuation') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_is_punctuation) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object _is_punctuation at 0x40022aee40, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (cp) 2 LOAD_CONST 1 (33) 4 COMPARE_OP 5 (>=) 6 POP_JUMP_IF_FALSE 16 8 LOAD_GLOBAL 0 (cp) 10 LOAD_CONST 2 (47) 12 COMPARE_OP 1 (<=) 14 POP_JUMP_IF_TRUE 64 >> 16 LOAD_GLOBAL 0 (cp) 18 LOAD_CONST 3 (58) 20 COMPARE_OP 5 (>=) 22 POP_JUMP_IF_FALSE 32 24 LOAD_GLOBAL 0 (cp) 26 LOAD_CONST 4 (64) 28 COMPARE_OP 1 (<=) 30 POP_JUMP_IF_TRUE 64 3 >> 32 LOAD_GLOBAL 0 (cp) 34 LOAD_CONST 5 (91) 36 COMPARE_OP 5 (>=) 38 POP_JUMP_IF_FALSE 48 40 LOAD_GLOBAL 0 (cp) 42 LOAD_CONST 6 (96) 44 COMPARE_OP 1 (<=) 46 POP_JUMP_IF_TRUE 64 >> 48 LOAD_GLOBAL 0 (cp) 50 LOAD_CONST 7 (123) 52 COMPARE_OP 5 (>=) 54 POP_JUMP_IF_FALSE 68 56 LOAD_GLOBAL 0 (cp) 58 LOAD_CONST 8 (126) 60 COMPARE_OP 1 (<=) 62 POP_JUMP_IF_FALSE 68 4 >> 64 LOAD_CONST 9 (True) 66 RETURN_VALUE 5 >> 68 LOAD_GLOBAL 0 (cp) 70 POP_JUMP_IF_FALSE 76 6 72 LOAD_CONST 9 (True) 74 RETURN_VALUE 7 >> 76 LOAD_CONST 10 (False) 78 RETURN_VALUE ``` Output uncompyle6: ```python= def _is_punctuation--- This code section failed: --- L. 2 0 LOAD_GLOBAL cp 2 LOAD_CONST 33 4 COMPARE_OP >= 6 POP_JUMP_IF_FALSE 16 'to 16' 8 LOAD_GLOBAL cp 10 LOAD_CONST 47 12 COMPARE_OP <= 14 POP_JUMP_IF_TRUE 64 'to 64' 16_0 COME_FROM 6 '6' 16 LOAD_GLOBAL cp 18 LOAD_CONST 58 20 COMPARE_OP >= 22 POP_JUMP_IF_FALSE 32 'to 32' 24 LOAD_GLOBAL cp 26 LOAD_CONST 64 28 COMPARE_OP <= 30 POP_JUMP_IF_TRUE 64 'to 64' 32_0 COME_FROM 22 '22' L. 3 32 LOAD_GLOBAL cp 34 LOAD_CONST 91 36 COMPARE_OP >= 38 POP_JUMP_IF_FALSE 48 'to 48' 40 LOAD_GLOBAL cp 42 LOAD_CONST 96 44 COMPARE_OP <= 46 POP_JUMP_IF_TRUE 64 'to 64' 48_0 COME_FROM 38 '38' 48 LOAD_GLOBAL cp 50 LOAD_CONST 123 52 COMPARE_OP >= 54 POP_JUMP_IF_FALSE 68 'to 68' 56 LOAD_GLOBAL cp 58 LOAD_CONST 126 60 COMPARE_OP <= 62 POP_JUMP_IF_FALSE 68 'to 68' 64_0 COME_FROM 46 '46' 64_1 COME_FROM 30 '30' 64_2 COME_FROM 14 '14' L. 4 64 LOAD_CONST True 66 RETURN_VALUE 68_0 COME_FROM 62 '62' 68_1 COME_FROM 54 '54' L. 5 68 LOAD_GLOBAL cp 70 POP_JUMP_IF_FALSE 76 'to 76' L. 6 72 LOAD_CONST True 74 RETURN_VALUE 76_0 COME_FROM 70 '70' L. 7 76 LOAD_CONST False 78 RETURN_VALUE -1 RETURN_LAST Parse error at or near `COME_FROM' instruction at offset 68_1 ``` Output Decompyle3: ```python= def _is_punctuation(): if not (cp >= 33 and cp <= 47): if not (cp >= 58 and cp <= 64): if not (cp >= 91 and cp <= 96): if not cp >= 123 or cp <= 126: return True if cp: return True return False ``` ## Error 1/25 Source: [link](https://github.com/ManiacalLabs/BiblioPixel/blob/afb993fbbe56e75e7c98f252df402b0f3e83bb6e/bibliopixel/project/fill.py#L72) Python version: 3.6 Decompyle3: Failed Uncompyle6: Failed Error: `Deparsing stopped due to parse error` | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Fail | Fail | Fail | ### MWE: ```python= def _fill_animation(desc): if not datatype: raise e or ValueError('Missing "datatype" in "animation" Section') ``` #### Closest Solution: ```python= def _fill_animation(desc): if not datatype: tmp = e or ValueError('Missing "datatype" in "animation" Section') raise tmp ``` ```c= 1 0 LOAD_CONST 0 (<code object _fill_animation at 0x4002216c90, file "main.py", line 1>) 2 LOAD_CONST 1 ('_fill_animation') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_fill_animation) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of _fill_animation: 2 0 LOAD_GLOBAL 0 (datatype) 2 POP_JUMP_IF_TRUE 20 3 4 LOAD_GLOBAL 1 (e) 6 JUMP_IF_TRUE_OR_POP 14 8 LOAD_GLOBAL 2 (ValueError) 10 LOAD_CONST 1 ('Missing "datatype" in "animation" Section') 12 CALL_FUNCTION 1 >> 14 STORE_FAST 1 (tmp) 4 16 LOAD_FAST 1 (tmp) 18 RAISE_VARARGS 1 >> 20 LOAD_CONST 0 (None) 22 RETURN_VALUE ``` #### MWE data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object _fill_animation at 0x4002216c90, file "main.py", line 1>) 2 LOAD_CONST 1 ('_fill_animation') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_fill_animation) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of _fill_animation: 2 0 LOAD_GLOBAL 0 (datatype) 2 POP_JUMP_IF_TRUE 16 3 4 LOAD_GLOBAL 1 (e) 6 JUMP_IF_TRUE_OR_POP 14 8 LOAD_GLOBAL 2 (ValueError) 10 LOAD_CONST 1 ('Missing "datatype" in "animation" Section') 12 CALL_FUNCTION 1 >> 14 RAISE_VARARGS 1 >> 16 LOAD_CONST 0 (None) 18 RETURN_VALUE ``` Output uncompyle6: ```python= def _fill_animation--- This code section failed: --- L. 2 0 LOAD_GLOBAL datatype 2 POP_JUMP_IF_TRUE 16 'to 16' L. 3 4 LOAD_GLOBAL e 6 JUMP_IF_TRUE_OR_POP 14 'to 14' 8 LOAD_GLOBAL ValueError 10 LOAD_STR 'Missing "datatype" in "animation" Section' 12 CALL_FUNCTION_1 1 '1 positional argument' 14_0 COME_FROM 6 '6' 14 RAISE_VARARGS_1 1 'exception' 16_0 COME_FROM 2 '2' Parse error at or near `RAISE_VARARGS_1' instruction at offset 14 1 0 LOAD_CONST 0 (<code object _fill_animation at 0x4002216c90, file "main.py", line 1>) 2 LOAD_CONST 1 ('_fill_animation') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (_fill_animation) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of _fill_animation: 2 0 LOAD_GLOBAL 0 (datatype) 2 POP_JUMP_IF_TRUE 16 3 4 LOAD_GLOBAL 1 (e) 6 JUMP_IF_TRUE_OR_POP 14 8 LOAD_GLOBAL 2 (ValueError) 10 LOAD_CONST 1 ('Missing "datatype" in "animation" Section') 12 CALL_FUNCTION 1 >> 14 RAISE_VARARGS 1 >> 16 LOAD_CONST 0 (None) 18 RETURN_VALUE ``` Output Decompyle3: ```python= Error: decompyle3 requires Python 3.7-3.8 ``` ## Error 1/26 Source: [link](https://github.com/jeremyjyang/BioClients/blob/master/BioClients/chem2bio2rdf/slap/Utils.py) Python version: 3.8 Decompyle3: Failed Uncompyle6: Failed Error: `Deparsing stopped due to parse error` MWE 1: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | MWE 2: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | MWE 3: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | MWE 4: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass-Incorrect | Pass | MWE 5: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | ### MWE: #### MWE1: ```python= def Drug2Targets(): for cid in cids: try: pass except Exception as e: continue ``` ##### Closest Solution1: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE1 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object Drug2Targets at 0x400236eb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('Drug2Targets') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (Drug2Targets) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object Drug2Targets at 0x400236eb30, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (cids) 2 GET_ITER >> 4 FOR_ITER 26 (to 32) 6 STORE_FAST 0 (cid) 3 8 SETUP_FINALLY 4 (to 14) 4 10 POP_BLOCK 12 JUMP_ABSOLUTE 4 5 >> 14 POP_TOP 16 POP_TOP 18 POP_TOP 6 20 POP_EXCEPT 22 JUMP_ABSOLUTE 4 24 POP_EXCEPT 26 JUMP_ABSOLUTE 4 28 END_FINALLY 30 JUMP_ABSOLUTE 4 >> 32 LOAD_CONST 0 (None) 34 RETURN_VALUE ``` Output uncompyle6: ```python= def Drug2Targets--- This code section failed: --- L. 2 0 LOAD_GLOBAL cids 2 GET_ITER 4 FOR_ITER 32 'to 32' 6 STORE_FAST 'cid' L. 3 8 SETUP_FINALLY 14 'to 14' L. 4 10 POP_BLOCK 12 JUMP_BACK 4 'to 4' 14_0 COME_FROM_FINALLY 8 '8' L. 5 14 POP_TOP 16 POP_TOP 18 POP_TOP L. 6 20 POP_EXCEPT 22 JUMP_BACK 4 'to 4' 24 POP_EXCEPT 26 JUMP_BACK 4 'to 4' 28 END_FINALLY 30 JUMP_BACK 4 'to 4' Parse error at or near `POP_EXCEPT' instruction at offset 24 ``` Output Decompyle3: ```python= Instruction context: L. 6 20 POP_EXCEPT -> 22 JUMP_BACK 4 'to 4' 24 POP_EXCEPT 26 JUMP_BACK 4 'to 4' 28 END_FINALLY 30 JUMP_BACK 4 'to 4' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` #### MWE2: ```python= def Drug2BioSimilarDrugs(): for cid in cids: try: pass except Exception as e: continue ``` ##### Closest Solution2: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE2 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object Drug2BioSimilarDrugs at 0x40021eeb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('Drug2BioSimilarDrugs') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (Drug2BioSimilarDrugs) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object Drug2BioSimilarDrugs at 0x40021eeb30, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (cids) 2 GET_ITER >> 4 FOR_ITER 52 (to 58) 6 STORE_FAST 0 (cid) 3 8 SETUP_FINALLY 4 (to 14) 4 10 POP_BLOCK 12 JUMP_ABSOLUTE 4 5 >> 14 DUP_TOP 16 LOAD_GLOBAL 1 (Exception) 18 COMPARE_OP 10 (exception match) 20 POP_JUMP_IF_FALSE 54 22 POP_TOP 24 STORE_FAST 1 (e) 26 POP_TOP 28 SETUP_FINALLY 12 (to 42) 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 6 (to 42) 36 JUMP_ABSOLUTE 4 38 POP_BLOCK 40 BEGIN_FINALLY >> 42 LOAD_CONST 0 (None) 44 STORE_FAST 1 (e) 46 DELETE_FAST 1 (e) 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_ABSOLUTE 4 >> 54 END_FINALLY 56 JUMP_ABSOLUTE 4 >> 58 LOAD_CONST 0 (None) 60 RETURN_VALUE ``` Output uncompyle6: ```python= def Drug2BioSimilarDrugs--- This code section failed: --- L. 2 0 LOAD_GLOBAL cids 2 GET_ITER 4 FOR_ITER 58 'to 58' 6 STORE_FAST 'cid' L. 3 8 SETUP_FINALLY 14 'to 14' L. 4 10 POP_BLOCK 12 JUMP_BACK 4 'to 4' 14_0 COME_FROM_FINALLY 8 '8' L. 5 14 DUP_TOP 16 LOAD_GLOBAL Exception 18 COMPARE_OP exception-match 20 POP_JUMP_IF_FALSE 54 'to 54' 22 POP_TOP 24 STORE_FAST 'e' 26 POP_TOP 28 SETUP_FINALLY 42 'to 42' L. 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 42 'to 42' 36 JUMP_BACK 4 'to 4' 38 POP_BLOCK 40 BEGIN_FINALLY 42_0 COME_FROM 34 '34' 42_1 COME_FROM_FINALLY 28 '28' 42 LOAD_CONST None 44 STORE_FAST 'e' 46 DELETE_FAST 'e' 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_BACK 4 'to 4' 54_0 COME_FROM 20 '20' 54 END_FINALLY 56 JUMP_BACK 4 'to 4' Parse error at or near `CALL_FINALLY' instruction at offset 34 ``` Output Decompyle3: ```python= Instruction context: L. 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 42 'to 42' -> 36 JUMP_BACK 4 'to 4' 38 POP_BLOCK 40 BEGIN_FINALLY 42_0 COME_FROM 34 '34' 42_1 COME_FROM_FINALLY 28 '28' 42 LOAD_CONST None 44 STORE_FAST 'e' 46 DELETE_FAST 'e' 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_BACK 4 'to 4' 54_0 COME_FROM 20 '20' 54 END_FINALLY 56 JUMP_BACK 4 'to 4' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` #### MWE3: ```python= def Target2Drugs(): for tid in tids: try: pass except Exception as e: continue ``` ##### Closest Solution3: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE3 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object Target2Drugs at 0x400246eb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('Target2Drugs') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (Target2Drugs) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object Target2Drugs at 0x400246eb30, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (tids) 2 GET_ITER >> 4 FOR_ITER 52 (to 58) 6 STORE_FAST 0 (tid) 3 8 SETUP_FINALLY 4 (to 14) 4 10 POP_BLOCK 12 JUMP_ABSOLUTE 4 5 >> 14 DUP_TOP 16 LOAD_GLOBAL 1 (Exception) 18 COMPARE_OP 10 (exception match) 20 POP_JUMP_IF_FALSE 54 22 POP_TOP 24 STORE_FAST 1 (e) 26 POP_TOP 28 SETUP_FINALLY 12 (to 42) 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 6 (to 42) 36 JUMP_ABSOLUTE 4 38 POP_BLOCK 40 BEGIN_FINALLY >> 42 LOAD_CONST 0 (None) 44 STORE_FAST 1 (e) 46 DELETE_FAST 1 (e) 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_ABSOLUTE 4 >> 54 END_FINALLY 56 JUMP_ABSOLUTE 4 >> 58 LOAD_CONST 0 (None) 60 RETURN_VALUE ``` Output uncompyle6: ```python= def Target2Drugs--- This code section failed: --- L. 2 0 LOAD_GLOBAL tids 2 GET_ITER 4 FOR_ITER 58 'to 58' 6 STORE_FAST 'tid' L. 3 8 SETUP_FINALLY 14 'to 14' L. 4 10 POP_BLOCK 12 JUMP_BACK 4 'to 4' 14_0 COME_FROM_FINALLY 8 '8' L. 5 14 DUP_TOP 16 LOAD_GLOBAL Exception 18 COMPARE_OP exception-match 20 POP_JUMP_IF_FALSE 54 'to 54' 22 POP_TOP 24 STORE_FAST 'e' 26 POP_TOP 28 SETUP_FINALLY 42 'to 42' L. 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 42 'to 42' 36 JUMP_BACK 4 'to 4' 38 POP_BLOCK 40 BEGIN_FINALLY 42_0 COME_FROM 34 '34' 42_1 COME_FROM_FINALLY 28 '28' 42 LOAD_CONST None 44 STORE_FAST 'e' 46 DELETE_FAST 'e' 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_BACK 4 'to 4' 54_0 COME_FROM 20 '20' 54 END_FINALLY 56 JUMP_BACK 4 'to 4' Parse error at or near `CALL_FINALLY' instruction at offset 34 ``` Output Decompyle3: ```python= Instruction context: L. 6 30 POP_BLOCK 32 POP_EXCEPT 34 CALL_FINALLY 42 'to 42' -> 36 JUMP_BACK 4 'to 4' 38 POP_BLOCK 40 BEGIN_FINALLY 42_0 COME_FROM 34 '34' 42_1 COME_FROM_FINALLY 28 '28' 42 LOAD_CONST None 44 STORE_FAST 'e' 46 DELETE_FAST 'e' 48 END_FINALLY 50 POP_EXCEPT 52 JUMP_BACK 4 'to 4' 54_0 COME_FROM 20 '20' 54 END_FINALLY 56 JUMP_BACK 4 'to 4' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` #### MWE4: ```python= def DrugTargetPaths(): for cid in cids: for tid in tids: if odir and graphml.strip(): if not fout_graphml: logging.error('Failed to open output file: %s'%ofile_graphml) logging.info('%s'%ofile_graphml) x = x + 1 x = x + 1 x = x + 1 if score: n_dtp+=1 if score_type and not score_type in score_types: score_types[score_type]=1 score_types[score_type]+=1 if score_note and not score_note in score_notes: score_notes[score_note]=1 score_notes[score_note]+=1 if errtxt: if not errtxt in errs: errs[errtxt]=1 errs[errtxt]+=1 if errtxt == 'target was not found': tids_not_found.add(tid) elif errtxt == 'compound was not found': cids_not_found.add(cid) if tid_nmax and n_tid>=tid_skip+tid_nmax: break if cid_nmax and n_cid>=cid_skip+cid_nmax: break ``` > Note: Removing instructions leads to error "JUMP_ABSOLUTE" instead of "JUMP_BACK" ##### Closest Solution4: > Comment out the last two lines ```python= def DrugTargetPaths(): for cid in cids: for tid in tids: if odir and graphml.strip(): if not fout_graphml: logging.error('Failed to open output file: %s'%ofile_graphml) logging.info('%s'%ofile_graphml) x = x + 1 x = x + 1 x = x + 1 if score: n_dtp+=1 if score_type and not score_type in score_types: score_types[score_type]=1 score_types[score_type]+=1 if score_note and not score_note in score_notes: score_notes[score_note]=1 score_notes[score_note]+=1 if errtxt: if not errtxt in errs: errs[errtxt]=1 errs[errtxt]+=1 if errtxt == 'target was not found': tids_not_found.add(tid) elif errtxt == 'compound was not found': cids_not_found.add(cid) # if tid_nmax and n_tid>=tid_skip+tid_nmax: break # if cid_nmax and n_cid>=cid_skip+cid_nmax: break ``` ```c= ``` ##### MWE4 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object DrugTargetPaths at 0x400246e9d0, file "main.py", line 1>) 2 LOAD_CONST 1 ('DrugTargetPaths') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (DrugTargetPaths) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object DrugTargetPaths at 0x400246e9d0, file "main.py", line 1>: 2 0 LOAD_GLOBAL 0 (cids) 2 GET_ITER >> 4 EXTENDED_ARG 1 6 FOR_ITER 286 (to 294) 8 STORE_FAST 0 (cid) 3 10 LOAD_GLOBAL 1 (tids) 12 GET_ITER >> 14 EXTENDED_ARG 0 16 FOR_ITER 252 (to 270) 18 STORE_FAST 1 (tid) 4 20 LOAD_GLOBAL 2 (odir) 22 POP_JUMP_IF_FALSE 64 24 LOAD_GLOBAL 3 (graphml) 26 LOAD_METHOD 4 (strip) 28 CALL_METHOD 0 30 POP_JUMP_IF_FALSE 64 5 32 LOAD_GLOBAL 5 (fout_graphml) 34 POP_JUMP_IF_TRUE 50 36 LOAD_GLOBAL 6 (logging) 38 LOAD_METHOD 7 (error) 40 LOAD_CONST 1 ('Failed to open output file: %s') 42 LOAD_GLOBAL 8 (ofile_graphml) 44 BINARY_MODULO 46 CALL_METHOD 1 48 POP_TOP 6 >> 50 LOAD_GLOBAL 6 (logging) 52 LOAD_METHOD 9 (info) 54 LOAD_CONST 2 ('%s') 56 LOAD_GLOBAL 8 (ofile_graphml) 58 BINARY_MODULO 60 CALL_METHOD 1 62 POP_TOP 7 >> 64 LOAD_FAST 2 (x) 66 LOAD_CONST 3 (1) 68 BINARY_ADD 70 STORE_FAST 2 (x) 8 72 LOAD_FAST 2 (x) 74 LOAD_CONST 3 (1) 76 BINARY_ADD 78 STORE_FAST 2 (x) 9 80 LOAD_FAST 2 (x) 82 LOAD_CONST 3 (1) 84 BINARY_ADD 86 STORE_FAST 2 (x) 10 88 LOAD_GLOBAL 10 (score) 90 POP_JUMP_IF_FALSE 172 11 92 LOAD_FAST 3 (n_dtp) 94 LOAD_CONST 3 (1) 96 INPLACE_ADD 98 STORE_FAST 3 (n_dtp) 12 100 LOAD_GLOBAL 11 (score_type) 102 POP_JUMP_IF_FALSE 120 104 LOAD_GLOBAL 11 (score_type) 106 LOAD_GLOBAL 12 (score_types) 108 COMPARE_OP 7 (not in) 110 POP_JUMP_IF_FALSE 120 112 LOAD_CONST 3 (1) 114 LOAD_GLOBAL 12 (score_types) 116 LOAD_GLOBAL 11 (score_type) 118 STORE_SUBSCR 13 >> 120 LOAD_GLOBAL 12 (score_types) 122 LOAD_GLOBAL 11 (score_type) 124 DUP_TOP_TWO 126 BINARY_SUBSCR 128 LOAD_CONST 3 (1) 130 INPLACE_ADD 132 ROT_THREE 134 STORE_SUBSCR 14 136 LOAD_GLOBAL 13 (score_note) 138 POP_JUMP_IF_FALSE 156 140 LOAD_GLOBAL 13 (score_note) 142 LOAD_GLOBAL 14 (score_notes) 144 COMPARE_OP 7 (not in) 146 POP_JUMP_IF_FALSE 156 148 LOAD_CONST 3 (1) 150 LOAD_GLOBAL 14 (score_notes) 152 LOAD_GLOBAL 13 (score_note) 154 STORE_SUBSCR 15 >> 156 LOAD_GLOBAL 14 (score_notes) 158 LOAD_GLOBAL 13 (score_note) 160 DUP_TOP_TWO 162 BINARY_SUBSCR 164 LOAD_CONST 3 (1) 166 INPLACE_ADD 168 ROT_THREE 170 STORE_SUBSCR 16 >> 172 LOAD_GLOBAL 15 (errtxt) 174 POP_JUMP_IF_FALSE 246 17 176 LOAD_GLOBAL 15 (errtxt) 178 LOAD_GLOBAL 16 (errs) 180 COMPARE_OP 7 (not in) 182 POP_JUMP_IF_FALSE 192 184 LOAD_CONST 3 (1) 186 LOAD_GLOBAL 16 (errs) 188 LOAD_GLOBAL 15 (errtxt) 190 STORE_SUBSCR 18 >> 192 LOAD_GLOBAL 16 (errs) 194 LOAD_GLOBAL 15 (errtxt) 196 DUP_TOP_TWO 198 BINARY_SUBSCR 200 LOAD_CONST 3 (1) 202 INPLACE_ADD 204 ROT_THREE 206 STORE_SUBSCR 19 208 LOAD_GLOBAL 15 (errtxt) 210 LOAD_CONST 4 ('target was not found') 212 COMPARE_OP 2 (==) 214 POP_JUMP_IF_FALSE 228 20 216 LOAD_GLOBAL 17 (tids_not_found) 218 LOAD_METHOD 18 (add) 220 LOAD_FAST 1 (tid) 222 CALL_METHOD 1 224 POP_TOP 226 JUMP_FORWARD 18 (to 246) 21 >> 228 LOAD_GLOBAL 15 (errtxt) 230 LOAD_CONST 5 ('compound was not found') 232 COMPARE_OP 2 (==) 234 POP_JUMP_IF_FALSE 246 22 236 LOAD_GLOBAL 19 (cids_not_found) 238 LOAD_METHOD 18 (add) 240 LOAD_FAST 0 (cid) 242 CALL_METHOD 1 244 POP_TOP 23 >> 246 LOAD_GLOBAL 20 (tid_nmax) 248 POP_JUMP_IF_FALSE 14 250 LOAD_GLOBAL 21 (n_tid) 252 LOAD_GLOBAL 22 (tid_skip) 254 LOAD_GLOBAL 20 (tid_nmax) 256 BINARY_ADD 258 COMPARE_OP 5 (>=) 260 POP_JUMP_IF_FALSE 14 262 POP_TOP 264 EXTENDED_ARG 1 266 JUMP_ABSOLUTE 270 268 JUMP_ABSOLUTE 14 24 >> 270 LOAD_GLOBAL 23 (cid_nmax) 272 POP_JUMP_IF_FALSE 4 274 LOAD_GLOBAL 24 (n_cid) 276 LOAD_GLOBAL 25 (cid_skip) 278 LOAD_GLOBAL 23 (cid_nmax) 280 BINARY_ADD 282 COMPARE_OP 5 (>=) 284 POP_JUMP_IF_FALSE 4 286 POP_TOP 288 EXTENDED_ARG 1 290 JUMP_ABSOLUTE 294 292 JUMP_ABSOLUTE 4 >> 294 LOAD_CONST 0 (None) 296 RETURN_VALUE ``` Output uncompyle6: ```python= def DrugTargetPaths--- This code section failed: --- L. 2 0 LOAD_GLOBAL cids 2 GET_ITER 4_0 COME_FROM 284 '284' 4_1 COME_FROM 272 '272' 4_6 FOR_ITER 294 'to 294' 8 STORE_FAST 'cid' L. 3 10 LOAD_GLOBAL tids 12 GET_ITER 14_0 COME_FROM 260 '260' 14_1 COME_FROM 248 '248' 14_16 FOR_ITER 270 'to 270' 18 STORE_FAST 'tid' L. 4 20 LOAD_GLOBAL odir 22 POP_JUMP_IF_FALSE 64 'to 64' 24 LOAD_GLOBAL graphml 26 LOAD_METHOD strip 28 CALL_METHOD_0 0 '' 30 POP_JUMP_IF_FALSE 64 'to 64' L. 5 32 LOAD_GLOBAL fout_graphml 34 POP_JUMP_IF_TRUE 50 'to 50' L. 5 36 LOAD_GLOBAL logging 38 LOAD_METHOD error 40 LOAD_STR 'Failed to open output file: %s' 42 LOAD_GLOBAL ofile_graphml 44 BINARY_MODULO 46 CALL_METHOD_1 1 '' 48 POP_TOP 50_0 COME_FROM 34 '34' L. 6 50 LOAD_GLOBAL logging 52 LOAD_METHOD info 54 LOAD_STR '%s' 56 LOAD_GLOBAL ofile_graphml 58 BINARY_MODULO 60 CALL_METHOD_1 1 '' 62 POP_TOP 64_0 COME_FROM 30 '30' 64_1 COME_FROM 22 '22' L. 7 64 LOAD_FAST 'x' 66 LOAD_CONST 1 68 BINARY_ADD 70 STORE_FAST 'x' L. 8 72 LOAD_FAST 'x' 74 LOAD_CONST 1 76 BINARY_ADD 78 STORE_FAST 'x' L. 9 80 LOAD_FAST 'x' 82 LOAD_CONST 1 84 BINARY_ADD 86 STORE_FAST 'x' L. 10 88 LOAD_GLOBAL score 90 POP_JUMP_IF_FALSE 172 'to 172' L. 11 92 LOAD_FAST 'n_dtp' 94 LOAD_CONST 1 96 INPLACE_ADD 98 STORE_FAST 'n_dtp' L. 12 100 LOAD_GLOBAL score_type 102 POP_JUMP_IF_FALSE 120 'to 120' 104 LOAD_GLOBAL score_type 106 LOAD_GLOBAL score_types 108 COMPARE_OP not-in 110 POP_JUMP_IF_FALSE 120 'to 120' L. 12 112 LOAD_CONST 1 114 LOAD_GLOBAL score_types 116 LOAD_GLOBAL score_type 118 STORE_SUBSCR 120_0 COME_FROM 110 '110' 120_1 COME_FROM 102 '102' L. 13 120 LOAD_GLOBAL score_types 122 LOAD_GLOBAL score_type 124 DUP_TOP_TWO 126 BINARY_SUBSCR 128 LOAD_CONST 1 130 INPLACE_ADD 132 ROT_THREE 134 STORE_SUBSCR L. 14 136 LOAD_GLOBAL score_note 138 POP_JUMP_IF_FALSE 156 'to 156' 140 LOAD_GLOBAL score_note 142 LOAD_GLOBAL score_notes 144 COMPARE_OP not-in 146 POP_JUMP_IF_FALSE 156 'to 156' L. 14 148 LOAD_CONST 1 150 LOAD_GLOBAL score_notes 152 LOAD_GLOBAL score_note 154 STORE_SUBSCR 156_0 COME_FROM 146 '146' 156_1 COME_FROM 138 '138' L. 15 156 LOAD_GLOBAL score_notes 158 LOAD_GLOBAL score_note 160 DUP_TOP_TWO 162 BINARY_SUBSCR 164 LOAD_CONST 1 166 INPLACE_ADD 168 ROT_THREE 170 STORE_SUBSCR 172_0 COME_FROM 90 '90' L. 16 172 LOAD_GLOBAL errtxt 174 POP_JUMP_IF_FALSE 246 'to 246' L. 17 176 LOAD_GLOBAL errtxt 178 LOAD_GLOBAL errs 180 COMPARE_OP not-in 182 POP_JUMP_IF_FALSE 192 'to 192' L. 17 184 LOAD_CONST 1 186 LOAD_GLOBAL errs 188 LOAD_GLOBAL errtxt 190 STORE_SUBSCR 192_0 COME_FROM 182 '182' L. 18 192 LOAD_GLOBAL errs 194 LOAD_GLOBAL errtxt 196 DUP_TOP_TWO 198 BINARY_SUBSCR 200 LOAD_CONST 1 202 INPLACE_ADD 204 ROT_THREE 206 STORE_SUBSCR L. 19 208 LOAD_GLOBAL errtxt 210 LOAD_STR 'target was not found' 212 COMPARE_OP == 214 POP_JUMP_IF_FALSE 228 'to 228' L. 20 216 LOAD_GLOBAL tids_not_found 218 LOAD_METHOD add 220 LOAD_FAST 'tid' 222 CALL_METHOD_1 1 '' 224 POP_TOP 226 JUMP_FORWARD 246 'to 246' 228_0 COME_FROM 214 '214' L. 21 228 LOAD_GLOBAL errtxt 230 LOAD_STR 'compound was not found' 232 COMPARE_OP == 234 POP_JUMP_IF_FALSE 246 'to 246' L. 22 236 LOAD_GLOBAL cids_not_found 238 LOAD_METHOD add 240 LOAD_FAST 'cid' 242 CALL_METHOD_1 1 '' 244 POP_TOP 246_0 COME_FROM 234 '234' 246_1 COME_FROM 226 '226' 246_2 COME_FROM 174 '174' L. 23 246 LOAD_GLOBAL tid_nmax 248 POP_JUMP_IF_FALSE 14 'to 14' 250 LOAD_GLOBAL n_tid 252 LOAD_GLOBAL tid_skip 254 LOAD_GLOBAL tid_nmax 256 BINARY_ADD 258 COMPARE_OP >= 260 POP_JUMP_IF_FALSE 14 'to 14' L. 23 262 POP_TOP 264_266 JUMP_ABSOLUTE 270 'to 270' 268 JUMP_BACK 14 'to 14' L. 24 270 LOAD_GLOBAL cid_nmax 272 POP_JUMP_IF_FALSE 4 'to 4' 274 LOAD_GLOBAL n_cid 276 LOAD_GLOBAL cid_skip 278 LOAD_GLOBAL cid_nmax 280 BINARY_ADD 282 COMPARE_OP >= 284 POP_JUMP_IF_FALSE 4 'to 4' L. 24 286 POP_TOP 288_290 JUMP_ABSOLUTE 294 'to 294' 292 JUMP_BACK 4 'to 4' Parse error at or near `JUMP_BACK' instruction at offset 268 ``` Output Decompyle3: ```python= Instruction context: L. 23 262 POP_TOP -> 264_266 JUMP_FORWARD 270 'to 270' 268 JUMP_BACK 14 'to 14' 270_0 COME_FROM 264 '264' 270_1 COME_FROM 14 '14' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ``` #### MWE5: ```python= def ParseDTPathGraphml(): try: pass except Exception as e: return False ``` ##### Closest Solution5: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE5 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object ParseDTPathGraphml at 0x400246eb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('ParseDTPathGraphml') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (ParseDTPathGraphml) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object ParseDTPathGraphml at 0x400246eb30, file "main.py", line 1>: 2 0 SETUP_FINALLY 4 (to 6) 3 2 POP_BLOCK 4 JUMP_FORWARD 40 (to 46) 4 >> 6 DUP_TOP 8 LOAD_GLOBAL 0 (Exception) 10 COMPARE_OP 10 (exception match) 12 POP_JUMP_IF_FALSE 44 14 POP_TOP 16 STORE_FAST 0 (e) 18 POP_TOP 20 SETUP_FINALLY 10 (to 32) 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 4 (to 32) 28 LOAD_CONST 1 (False) 30 RETURN_VALUE >> 32 LOAD_CONST 0 (None) 34 STORE_FAST 0 (e) 36 DELETE_FAST 0 (e) 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 2 (to 46) >> 44 END_FINALLY >> 46 LOAD_CONST 0 (None) 48 RETURN_VALUE ``` Output uncompyle6: ```python= def ParseDTPathGraphml--- This code section failed: --- L. 2 0 SETUP_FINALLY 6 'to 6' L. 3 2 POP_BLOCK 4 JUMP_FORWARD 46 'to 46' 6_0 COME_FROM_FINALLY 0 '0' L. 4 6 DUP_TOP 8 LOAD_GLOBAL Exception 10 COMPARE_OP exception-match 12 POP_JUMP_IF_FALSE 44 'to 44' 14 POP_TOP 16 STORE_FAST 'e' 18 POP_TOP 20 SETUP_FINALLY 32 'to 32' L. 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 32 'to 32' 28 LOAD_CONST False 30 RETURN_VALUE 32_0 COME_FROM 26 '26' 32_1 COME_FROM_FINALLY 20 '20' 32 LOAD_CONST None 34 STORE_FAST 'e' 36 DELETE_FAST 'e' 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 46 'to 46' 44_0 COME_FROM 12 '12' 44 END_FINALLY 46_0 COME_FROM 42 '42' 46_1 COME_FROM 4 '4' Parse error at or near `CALL_FINALLY' instruction at offset 26 ``` Output Decompyle3: ```python= def ParseDTPathGraphml(): try: pass except Exception as e: try: return False finally: e = None del e ``` ## Error 1/27 Source: [link](https://github.com/jeremyjyang/BioClients/blob/master/BioClients/fda/aer/Utils.py) Python version: 3.8 Decompyle3: Pass-Incorrect Uncompyle6: Failed Error: `Deparsing stopped due to parse error` MWE 1: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | MWE 2: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Fail | Pass-Incorrect | Pass | Pass | MWE 3: | Py3.8 | Py3.7 | Py3.6 | Py2.7 | | -------- | -------- | -------- | -------- | | Pass | Pass-Incorrect | Pass | Pass | ### MWE: #### MWE1: ```python= def Info(base_url): try: pass except Exception as e: return None ``` ##### Closest Solution1: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE1 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object Info at 0x400246eb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('Info') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (Info) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object Info at 0x400246eb30, file "main.py", line 1>: 2 0 SETUP_FINALLY 4 (to 6) 3 2 POP_BLOCK 4 JUMP_FORWARD 40 (to 46) 4 >> 6 DUP_TOP 8 LOAD_GLOBAL 0 (Exception) 10 COMPARE_OP 10 (exception match) 12 POP_JUMP_IF_FALSE 44 14 POP_TOP 16 STORE_FAST 1 (e) 18 POP_TOP 20 SETUP_FINALLY 10 (to 32) 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 4 (to 32) 28 LOAD_CONST 0 (None) 30 RETURN_VALUE >> 32 LOAD_CONST 0 (None) 34 STORE_FAST 1 (e) 36 DELETE_FAST 1 (e) 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 2 (to 46) >> 44 END_FINALLY >> 46 LOAD_CONST 0 (None) 48 RETURN_VALUE ``` Output uncompyle6: ```python= def Info--- This code section failed: --- L. 2 0 SETUP_FINALLY 6 'to 6' L. 3 2 POP_BLOCK 4 JUMP_FORWARD 46 'to 46' 6_0 COME_FROM_FINALLY 0 '0' L. 4 6 DUP_TOP 8 LOAD_GLOBAL Exception 10 COMPARE_OP exception-match 12 POP_JUMP_IF_FALSE 44 'to 44' 14 POP_TOP 16 STORE_FAST 'e' 18 POP_TOP 20 SETUP_FINALLY 32 'to 32' L. 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 32 'to 32' 28 LOAD_CONST None 30 RETURN_VALUE 32_0 COME_FROM 26 '26' 32_1 COME_FROM_FINALLY 20 '20' 32 LOAD_CONST None 34 STORE_FAST 'e' 36 DELETE_FAST 'e' 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 46 'to 46' 44_0 COME_FROM 12 '12' 44 END_FINALLY 46_0 COME_FROM 42 '42' 46_1 COME_FROM 4 '4' Parse error at or near `CALL_FINALLY' instruction at offset 26 ``` Output Decompyle3: ```python= def Info(base_url): try: pass except Exception as e: try: return finally: e = None del e ``` #### MWE2: ```python= def GetFields(): try: pass except Exception as e: return None ``` ##### Closest Solution2: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE2 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object GetFields at 0x40021aeb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('GetFields') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (GetFields) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object GetFields at 0x40021aeb30, file "main.py", line 1>: 2 0 SETUP_FINALLY 4 (to 6) 3 2 POP_BLOCK 4 JUMP_FORWARD 40 (to 46) 4 >> 6 DUP_TOP 8 LOAD_GLOBAL 0 (Exception) 10 COMPARE_OP 10 (exception match) 12 POP_JUMP_IF_FALSE 44 14 POP_TOP 16 STORE_FAST 0 (e) 18 POP_TOP 20 SETUP_FINALLY 10 (to 32) 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 4 (to 32) 28 LOAD_CONST 0 (None) 30 RETURN_VALUE >> 32 LOAD_CONST 0 (None) 34 STORE_FAST 0 (e) 36 DELETE_FAST 0 (e) 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 2 (to 46) >> 44 END_FINALLY >> 46 LOAD_CONST 0 (None) 48 RETURN_VALUE ``` Output uncompyle6: ```python= def GetFields--- This code section failed: --- L. 2 0 SETUP_FINALLY 6 'to 6' L. 3 2 POP_BLOCK 4 JUMP_FORWARD 46 'to 46' 6_0 COME_FROM_FINALLY 0 '0' L. 4 6 DUP_TOP 8 LOAD_GLOBAL Exception 10 COMPARE_OP exception-match 12 POP_JUMP_IF_FALSE 44 'to 44' 14 POP_TOP 16 STORE_FAST 'e' 18 POP_TOP 20 SETUP_FINALLY 32 'to 32' L. 5 22 POP_BLOCK 24 POP_EXCEPT 26 CALL_FINALLY 32 'to 32' 28 LOAD_CONST None 30 RETURN_VALUE 32_0 COME_FROM 26 '26' 32_1 COME_FROM_FINALLY 20 '20' 32 LOAD_CONST None 34 STORE_FAST 'e' 36 DELETE_FAST 'e' 38 END_FINALLY 40 POP_EXCEPT 42 JUMP_FORWARD 46 'to 46' 44_0 COME_FROM 12 '12' 44 END_FINALLY 46_0 COME_FROM 42 '42' 46_1 COME_FROM 4 '4' Parse error at or near `CALL_FINALLY' instruction at offset 26 ``` Output Decompyle3: ```python= def GetFields(): try: pass except Exception as e: try: return finally: e = None del e ``` #### MWE3: ```python= def Search(): while nmax==0 or ndone<nmax: try: pass except Exception as e: break ``` ##### Closest Solution3: No solution. See [this](https://hackmd.io/@aliahad97/ry3JqUjad#MWE-2) ##### MWE3 data: Bytecode for MWE: ```c= 1 0 LOAD_CONST 0 (<code object Search at 0x40021eeb30, file "main.py", line 1>) 2 LOAD_CONST 1 ('Search') 4 MAKE_FUNCTION 0 6 STORE_NAME 0 (Search) 8 LOAD_CONST 2 (None) 10 RETURN_VALUE Disassembly of <code object Search at 0x40021eeb30, file "main.py", line 1>: 2 >> 0 LOAD_GLOBAL 0 (nmax) 2 LOAD_CONST 1 (0) 4 COMPARE_OP 2 (==) 6 POP_JUMP_IF_TRUE 16 8 LOAD_GLOBAL 1 (ndone) 10 LOAD_GLOBAL 0 (nmax) 12 COMPARE_OP 0 (<) 14 POP_JUMP_IF_FALSE 66 3 >> 16 SETUP_FINALLY 4 (to 22) 4 18 POP_BLOCK 20 JUMP_ABSOLUTE 0 5 >> 22 DUP_TOP 24 LOAD_GLOBAL 2 (Exception) 26 COMPARE_OP 10 (exception match) 28 POP_JUMP_IF_FALSE 62 30 POP_TOP 32 STORE_FAST 0 (e) 34 POP_TOP 36 SETUP_FINALLY 12 (to 50) 6 38 POP_BLOCK 40 POP_EXCEPT 42 CALL_FINALLY 6 (to 50) 44 JUMP_ABSOLUTE 66 46 POP_BLOCK 48 BEGIN_FINALLY >> 50 LOAD_CONST 0 (None) 52 STORE_FAST 0 (e) 54 DELETE_FAST 0 (e) 56 END_FINALLY 58 POP_EXCEPT 60 JUMP_ABSOLUTE 0 >> 62 END_FINALLY 64 JUMP_ABSOLUTE 0 >> 66 LOAD_CONST 0 (None) 68 RETURN_VALUE ``` Output uncompyle6: ```python= def Search--- This code section failed: --- L. 2 0 LOAD_GLOBAL nmax 2 LOAD_CONST 0 4 COMPARE_OP == 6 POP_JUMP_IF_TRUE 16 'to 16' 8 LOAD_GLOBAL ndone 10 LOAD_GLOBAL nmax 12 COMPARE_OP < 14 POP_JUMP_IF_FALSE 66 'to 66' 16_0 COME_FROM 6 '6' L. 3 16 SETUP_FINALLY 22 'to 22' L. 4 18 POP_BLOCK 20 JUMP_BACK 0 'to 0' 22_0 COME_FROM_FINALLY 16 '16' L. 5 22 DUP_TOP 24 LOAD_GLOBAL Exception 26 COMPARE_OP exception-match 28 POP_JUMP_IF_FALSE 62 'to 62' 30 POP_TOP 32 STORE_FAST 'e' 34 POP_TOP 36 SETUP_FINALLY 50 'to 50' L. 6 38 POP_BLOCK 40 POP_EXCEPT 42 CALL_FINALLY 50 'to 50' 44 JUMP_ABSOLUTE 66 'to 66' 46 POP_BLOCK 48 BEGIN_FINALLY 50_0 COME_FROM 42 '42' 50_1 COME_FROM_FINALLY 36 '36' 50 LOAD_CONST None 52 STORE_FAST 'e' 54 DELETE_FAST 'e' 56 END_FINALLY 58 POP_EXCEPT 60 JUMP_BACK 0 'to 0' 62_0 COME_FROM 28 '28' 62 END_FINALLY 64 JUMP_BACK 0 'to 0' 66_0 COME_FROM 14 '14' Parse error at or near `CALL_FINALLY' instruction at offset 42 ``` Output Decompyle3: ```python= Instruction context: L. 6 38 POP_BLOCK 40 POP_EXCEPT 42 CALL_FINALLY 50 'to 50' -> 44 JUMP_FORWARD 66 'to 66' 46 POP_BLOCK 48 BEGIN_FINALLY 50_0 COME_FROM 42 '42' 50_1 COME_FROM_FINALLY 36 '36' 50 LOAD_CONST None 52 STORE_FAST 'e' 54 DELETE_FAST 'e' 56 END_FINALLY 58 POP_EXCEPT 60 JUMP_BACK 0 'to 0' 62_0 COME_FROM 28 '28' 62 END_FINALLY 64 JUMP_BACK 0 'to 0' 66_0 COME_FROM 44 '44' test/main.pyc -- # decompile failed # file test/main.pyc # Deparsing stopped due to parse error ```