Giter VIP home page Giter VIP logo

Comments (9)

rocky avatar rocky commented on September 15, 2024

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.

rocky avatar rocky commented on September 15, 2024

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.

gkdiorflpgh04 avatar gkdiorflpgh04 commented on September 15, 2024

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.

  1. new a python 3.10.4 venv
  2. pip install uncompyle6
  3. 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.

gkdiorflpgh04 avatar gkdiorflpgh04 commented on September 15, 2024

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.

gkdiorflpgh04 avatar gkdiorflpgh04 commented on September 15, 2024

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.

rocky avatar rocky commented on September 15, 2024

You need to prove it then.

from python-uncompyle6.

gkdiorflpgh04 avatar gkdiorflpgh04 commented on September 15, 2024

Thank you, I have made the following attempts.

  1. Createnew Python environment.
  2. pip install uncompyle6
  3. 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.

@rocky

from python-uncompyle6.

gkdiorflpgh04 avatar gkdiorflpgh04 commented on September 15, 2024

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.

rocky avatar rocky commented on September 15, 2024

(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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.