rocky/python-decompile3

Decompilation of example.pyc fails with error message "Parse error at or near `CALL_METHOD_1'"

kikikikikinanana opened this issue · 0 comments

Description

Decompilation of example.pyc fails with error message "Parse error at or near `CALL_METHOD_1'"

How to Reproduce

Run latest decompyle3 built from source, with the example.pyc file attached

file example.pyc (zipped)

example.zip

Output Given

(skip)...

L.1073 754 LOAD_NAME threading
756 LOAD_ATTR Thread
758 LOAD_NAME maintask
760 LOAD_CONST 5
762 LOAD_NAME profile
764 BUILD_TUPLE_2 2
766 LOAD_CONST ('target', 'args')
768 CALL_FUNCTION_KW_2 2 '2 total positional and keyword args'
770 STORE_NAME mainstart

L.1074 772 LOAD_NAME mainstart
774 LOAD_METHOD start
776 CALL_METHOD_0 0 ''
778 POP_TOP

L.1075 780 LOAD_NAME time
782 LOAD_METHOD sleep
784 LOAD_CONST 0.1
786 CALL_METHOD_1 1 ''
788 POP_TOP
790_792 JUMP_LOOP 642 'to 642'
794_0 COME_FROM 642 '642'
794 BREAK_LOOP 802 'to 802'
796_0 COME_FROM 630 '630'

L.1077 796 LOAD_NAME quit
798 CALL_FUNCTION_0 0 ''
800 POP_TOP
802_0 COME_FROM 794 '794'

L.1078 802 LOAD_NAME time
804 LOAD_METHOD sleep
806 LOAD_CONST 300000
808 CALL_METHOD_1 1 ''
810 POP_TOP

Parse error at or near `CALL_METHOD_1' instruction at offset 808

Expected behavior

The decompiler can create a compileable source file.

Environment

decompyle3 built from latest source
Python bytecode version base 3.8.0 (3413)
Python 3.8.13