Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Xcating opened this issue Mar 1, 2024 · 1 comment
Open
Labels
bug A confirmed bug in the code base. User misunderstanding, misuse, or features wanted are not bugs. Bytecode is large and needs narrowing Source and bytecode is large. User needs to shorten or pinpoint the boundary better Python 3.8

Comments

@Xcating
Copy link

Xcating commented Mar 1, 2024

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
@rocky
Copy link
Owner

rocky commented Mar 25, 2024

When I try decompiling, I am not seeing that particular error, although the bytecode does not decompiler. I suspect that message is related to a memory allocation problem.

The bytecode for this is very large and probably auto-generated by a program. It seems like the bytecode to some sort of game, right?

While this is a legitimate bug, it is not in the form that can be easily isolated to make it easy to fix. It would help to have the smallest case that exhibits the problem. Doing that may be a fair amount of work for someone to undertake.

In other words, this would be tedious work to fix as this code stands. It may eventually get fixed, through a different bug report or by someone doing work to pinpoint the problem more.

@rocky rocky added bug A confirmed bug in the code base. User misunderstanding, misuse, or features wanted are not bugs. Python 3.8 Bytecode is large and needs narrowing Source and bytecode is large. User needs to shorten or pinpoint the boundary better labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed bug in the code base. User misunderstanding, misuse, or features wanted are not bugs. Bytecode is large and needs narrowing Source and bytecode is large. User needs to shorten or pinpoint the boundary better Python 3.8
Projects
None yet
Development

No branches or pull requests

2 participants