0

I'm trying to decompile a python .pyc file into a source code .py file with uncompyle6, but I'm getting the error "Unknown type 64 @".

Here is the error message:

Unknown type 64 @
Unknown type 0
Unknown type 0
Unknown type 0
Unknown type 64 @
Unknown type 0
Unknown type 0
Unknown type 0
Unknown type 15 
Unknown type 24 
Unknown type 125 }
Unknown type 2 
Unknown type 124 |
Unknown type 2 
Unknown type 32
Unknown type 1 
Unknown type 87 W
Traceback (most recent call last):
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\load.py", line 304, in load_module_from_file_object
   co = xdis.unmarshal.load_code(fp, magic_int, code_objects)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 565, in load_code
   return um_gen.load()
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 179, in load
   return self.r_object()
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 500, in t_code
   co_cellvars = self.r_object(bytes_for_s=bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 381, in t_small_tuple
   ret += (self.r_object(bytes_for_s=bytes_for_s),)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 500, in t_code
   co_cellvars = self.r_object(bytes_for_s=bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 381, in t_small_tuple
   ret += (self.r_object(bytes_for_s=bytes_for_s),)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 486, in t_code
   co_code = self.r_object(bytes_for_s=True)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 222, in r_object
   return unmarshal_func(save_ref, bytes_for_s)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\unmarshal.py", line 520, in t_code
   code = to_portable(
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\codetype\__init__.py", line 200, in to_portable
   return codeType2Portable(code, version_triple)
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\codetype\__init__.py", line 43, in codeType2Portable
   return Code3(
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\codetype\code30.py", line 80, in __init__
   self.check()
 File "c:\users\angela\appdata\local\programs\python\python39\lib\site-packages\xdis\codetype\code13.py", line 87, in check
   assert type(val) in fieldtype, "%s should be one of the types %s; is type %s" % (field, fieldtype, type(val))
AssertionError: co_code should be one of the types (<class 'str'>, <class 'bytes'>, <class 'list'>, <class 'tuple'>); is type <class 'NoneType'>
Ill-formed bytecode file fbs13.pyc
<class 'AssertionError'>; co_code should be one of the types (<class 'str'>, <class 'bytes'>, <class 'list'>, <class 'tuple'>); is type <class 'NoneType'>

I tried to change the magic number in the header of the .pyc file but no change. After searching on the internet some people said it was because my operating system was 64bit. Does anyone have any idea. thanks in advance.

angela
  • 1
  • 2

0 Answers0