decompyle failure

Aperta
#159 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start with the decompyle3/bin/decompile.py entry point and reproduce the parse error using the attached logh_utils.pyc file and the Python 3.10.2 environment described. Compare the failing output with the included uncompyle6 output; done means decompyle3 successfully decompiles this source instead of stopping at the parse error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Decompyle3 failed at decompiling some code, where uncompyle6 was successful.

That's too bad because the generated code is of higher quality.

How to Reproduce

See attached sources:
logh_utils.zip

I included the pyc file, the uncompyle3 output, the decompyle6 output.

(.env) C:\work\logh_home\log_enhancer.exe_extracted>python ..\python-decompile3\decompyle3\bin\decompile.py C:\work\logh_home\log_enhancer.exe_extracted\src\logh_utils.pyc  1>C:\work\logh_home\log_enhancer.exe_extracted\src\logh_utils.py

# file C:\work\logh_home\log_enhancer.exe_extracted\src\logh_utils.pyc
# Deparsing stopped due to parse error

Output Given

def sub_interp_node_to_string--- This code section failed: ---

L. 82 0 BUILD_LIST_0 0
2 STORE_FAST 'ret'

L. 83 4 LOAD_STR '%s %s'
6 LOAD_FAST 'prefix'
...

(see attached decompiled py)

Environment

(.env) C:\work\logh_home>pip list
Package      Version    Location
------------ ---------- -----------------------------------
click        8.1.7
colorama     0.4.6
decompyle3   3.9.1.dev0 c:\work\logh_home\python-decompile3
pip          21.2.4
setuptools   58.1.0
six          1.16.0
spark-parser 1.8.9
uncompyle6   3.9.0
xdis         6.1.0.dev0

(.env) C:\work\logh_home>python --version
Python 3.10.2

Platform : Windows 10 22H2

Workarounds

Use uncompyle6

Priority

Up to you

Lingua principale
Python
Stelle
1.3k
Fork
167
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rocky/python-decompile3

Tutte le issue di rocky/python-decompile3

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.