Comments (9)
I just tried decompling this locally on Ubuntu from a command-line and using the open()
code and I am not seeing a problem in decompation.
The fact that you are getting that vague error message rather than information from the Python runtime with a stack trace leads me to believe something is weird about your environment or how this gets run from that code.
When you run this from a command-line does that error? When you run from a command-line using option "-a" does the output start:
L. 2 0 LOAD_CONST -1
3 LOAD_CONST ('hul_ai',)
6 IMPORT_NAME 0 'custom.pub.ccom'
9 IMPORT_FROM 1 'hul_ai'
12 STORE_NAME 1 'hul_ai'
15 POP_TOP
16_0 COLLECTION_START 0 'CONST_LIST'
L. 3 16 ADD_VALUE 2 0.145163744688
19 ADD_VALUE 3 0.0449195094407
22 ADD_VALUE 4 -0.643097877502
?
from python-uncompyle6.
While I appreciate the fact that you looked at other problems for similarities, I do not see that these are related yet.
That issue had to do with the types of the list values getting confused between variable names and strings as list elements. There is no evidence this is going on here.
Also, there is no report that things crashed let alone a stack trace.
from python-uncompyle6.
Thank you for your response.
When I run from a command-line using option "-a",I did indeed receive the output you mentioned.
But when I don't use -a, the result is as follows.
(venv) PS C:\test> uncompyle6 .\26193884.pyc
# uncompyle6 version 3.9.0
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
# Embedded file name: custom\pub\helper\RL\runtime_models\model_1002000_cpp.py
(venv) PS C:\test>
In order to better describe the problem, I conducted the following tests.
- new a python 3.10.4 venv
- pip install uncompyle6
- run
import uncompyle6
def main():
uncompyle6.decompile_file("26193884.pyc")
if __name__ == '__main__':
main()
I have obtained the following results.
C:\test\venv\Scripts\python.exe C:\test\main.py
# uncompyle6 version 3.9.0
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
# Embedded file name: custom\pub\helper\RL\runtime_models\model_1002000_cpp.py
Process finished with exit code -1073741571 (0xC00000FD)
from python-uncompyle6.
I'm sorry, I think this issue can be closed now. After creating a Python 2.7 environment using conda, it is working fine.
But even when creating a new 3.10 or 3.8 environment using conda, it still doesn't work properly.
Process finished with exit code -1073741571 (0xC00000FD)
from python-uncompyle6.
I'm sorry, but I still think this is an issue because the uncompyle6 version in 2.7 is outdated. I believe there are still problems with this pyc file even in the version 3.9.0 of uncompyle6. @rocky
from python-uncompyle6.
You need to prove it then.
from python-uncompyle6.
Thank you, I have made the following attempts.
- Createnew Python environment.
- pip install uncompyle6
- run
uncompyle6.decompile_file("28856229.pyc", outstream=sys.stdout)
The conclusion is that this pyc file can only be decompiled correctly in a Python 2 environment,
And when I decompile another pyc file using Python 2, its docstring is displayed as something like "\xe8\x8e\xb7\xe5\x8f\x96\xe4\xb8\x8b\xe4".
I used uncompyle6 3.9.0 throughout the process.
in python 3.10 3.9 3.8 3.6, Output like this:
# uncompyle6 version 3.9.0
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
# Embedded file name: custom\pub\helper\RL\runtime_models\model_1002000_cpp.py
Process finished with exit code -1073741571 (0xC00000FD)
In Python 2.7, it can decompile the source code normally,But the docstring displays incorrectly.
from python-uncompyle6.
After further testing
it was found that the program works fine on Ubuntu regardless of whether Python 2 or Python 3 is used.
However, it does not work on Windows.
I assure you that this is not due to my personal environment configuration issue.
I'm not sure if this question belongs to Python or this project. I hope to get your answer.
from python-uncompyle6.
(Re)read the the last paragraph of https://github.com/rocky/python-uncompyle6/blob/master/HOW-TO-REPORT-A-BUG.md#the-importance-of-your-bug-report
Private consulting rates are listed at the bottom of the page and here: https://github.com/rocky
from python-uncompyle6.
Related Issues (20)
- lambda + dict comprehension is not decompiled properly HOT 2
- bug HOT 1
- just became a sponsor and need help to uncompyle python 3.11 exe file HOT 1
- Unknown magic number 227 in shopee.pyc
- failure for "if a or not b:" HOT 5
- Incorrect decompilation of genexpr with `if isinstance` HOT 1
- liberapay link ? HOT 4
- Request for uncompyle6 to support newer versions of python.
- Missing "While True" HOT 4
- Redundant "else:"
- List comprehensions inside of a lambda print only `[` HOT 4
- Unsupported Python version, 3.11, for decompilation HOT 3
- AssertionError HOT 1
- Added support for later versions of Python
- uncompyle6 / decompile / issue HOT 1
- whilestmt38 contains a "_stmts" instead of one of "l_stmts", "l_stmts_opt", "pass" HOT 1
- does not smell like code
- When will python3.12 be supported? HOT 1
- help -h isn't a thing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-uncompyle6.