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

IndexError: tuple index out of range #329

Open
rishthas opened this issue Sep 24, 2020 · 1 comment
Open

IndexError: tuple index out of range #329

rishthas opened this issue Sep 24, 2020 · 1 comment
Labels
Invalid Bytecode Bytecode is not the result of Python compilation. It may have been altered in some way Questionable Activity Possibly non-ethical or illegal activity

Comments

@rishthas
Copy link

Hi,
I am a bunch of pyc to be decompiled to py. The pyc is compiled by python version 2.7. So i downloaded the python-2.4 branch and setup the same in my python 2.7 env.
Now when I run the uncompyle6, I am getting the below error.

D:\>uncompyle6 -d "D:\Biotion85\mysite\urls.pyc"
# 2020.09.24 21:19:39 Arabian Standard Time
# uncompyle6 version 3.7.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (default, May  6 2018, 17:56:56) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: G:\Packages\source\source_8.5.3\mysite\urls.py
# Compiled at: 2020-09-10 16:53:00
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python27\Scripts\uncompyle6-script.py", line 11, in <module>
    load_entry_point('uncompyle6==3.7.4', 'console_scripts', 'uncompyle6')()
  File "build\bdist.win-amd64\egg\uncompyle6\bin\uncompile.py", line 190, in main_bin
  File "build\bdist.win-amd64\egg\uncompyle6\main.py", line 327, in main
  File "build\bdist.win-amd64\egg\uncompyle6\main.py", line 229, in decompile_file
  File "build\bdist.win-amd64\egg\uncompyle6\main.py", line 148, in decompile
  File "build\bdist.win-amd64\egg\uncompyle6\semantics\pysource.py", line 2574, in code_deparse
  File "build\bdist.win-amd64\egg\uncompyle6\scanners\scanner2.py", line 362, in ingest
IndexError: tuple index out of range

attaching the pyc file for your reference.
urls.pyc.txt

Please help.

@rocky rocky added Invalid Bytecode Bytecode is not the result of Python compilation. It may have been altered in some way Questionable Activity Possibly non-ethical or illegal activity labels Sep 25, 2020
@shobhitag11
Copy link

I am also facing the same issue, please help

Decompiled from: Python 2.7.18 |Anaconda, Inc.| (default, Apr 23 2020, 17:26:54) [MSC v.1500 64 bit (AMD64)]

Embedded file name: hru-hru

Traceback (most recent call last):
File "c:\anaconda\envs\py2\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "c:\anaconda\envs\py2\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Anaconda\envs\py2\Scripts\uncompyle6.exe_main
.py", line 7, in
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\bin\uncompile.py", line 194, in main_bin
**options)
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\main.py", line 324, in main
do_fragments,
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\main.py", line 222, in decompile_file
do_fragments=do_fragments,
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\main.py", line 141, in decompile
co, out, bytecode_version, debug_opts=debug_opts, is_pypy=is_pypy
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\semantics\pysource.py", line 2573, in code_deparse
co, code_objects=code_objects, show_asm=debug_opts["asm"]
File "c:\anaconda\envs\py2\lib\site-packages\uncompyle6\scanners\scanner2.py", line 408, in ingest
target_index = self.offset2inst_index[target]
KeyError: 67

below is the file attached..
gui.pyc.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Bytecode Bytecode is not the result of Python compilation. It may have been altered in some way Questionable Activity Possibly non-ethical or illegal activity
Projects
None yet
Development

No branches or pull requests

3 participants