rocky / rocky/python-decompile3

TypeError: __new__() got an unexpected keyword argument 'positions'

Open
#166 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Bytecode is large and needs narrowing Python 3.8
Dominant language
Python
Stars
1.3k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

Description

run the

decompyle3 pvzrouge.pyc

TypeError: new() got an unexpected keyword argument 'positions'

How to Reproduce

decompyle3 pvzrouge.pyc

PVZ-Rouge.zip

pvzrouge.zip

Output Given

# decompyle3 version 3.9.1.dev0
# Python bytecode version base 3.8.0 (3413)
# Decompiled from: Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
# Embedded file name: pvzrouge.py
Traceback (most recent call last):
  File "E:\Python308\Scripts\decompyle3-script.py", line 11, in <module>
    load_entry_point('decompyle3==3.9.1.dev0', 'console_scripts', 'decompyle3')()
  File "E:\Python308\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "E:\Python308\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "E:\Python308\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "E:\Python308\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\bin\decompile.py", line 166, in main_bin
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\main.py", line 336, in main
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\main.py", line 239, in decompile_file
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\main.py", line 159, in decompile
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\semantics\pysource.py", line 1121, in code_deparse
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\scanners\scanner38.py", line 67, in ingest
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\scanners\scanner37.py", line 65, in ingest
  File "E:\Python308\lib\site-packages\decompyle3-3.9.1.dev0-py3.8.egg\decompyle3\scanners\scanner37base.py", line 373, in ingest
TypeError: __new__() got an unexpected keyword argument 'positions'

Expected behavior

Successfully output pvzrooge.py

Environment

decompyle3, version 3.9.1.dev0
(github latest version)
(use setup.py installed)
Python 3.8.0
Windows 11
PIP LIST

Package      Version
------------ -------
click        8.1.7
colorama     0.4.6
decompyle3 3.9.1.dev0   3.9.0
pip          19.2.3
setuptools   41.2.0
six          1.16.0
spark-parser 1.8.9
uncompyle6   3.9.0
xdis         6.0.5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with decompyle3/scanners/scanner37base.py at the ingest path reported in the traceback, then reproduce the failure with the attached pvzrouge.pyc archive using the documented decompyle3 command. Trace the unexpected positions argument through the scanner path; done means the supplied bytecode decompiles successfully without this TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.