sebaubuntu-python/aospdtgen

TypeError: 'type' object is not subscriptable

Closed this issue · 1 comments

Enviroment:
WSL2 // ubuntu 20.

Install is ok:
edward@NRT39609:~/aospdtgen$ pip3 install .
Processing /home/edward/aospdtgen
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: pyelftools<0.28,>=0.27 in /home/edward/.local/lib/python3.8/site-packages (from aospdtgen==0.1.0) (0.27)
Requirement already satisfied: Jinja2<4.0.0,>=3.0.3 in /home/edward/.local/lib/python3.8/site-packages (from aospdtgen==0.1.0) (3.0.3)
Requirement already satisfied: MarkupSafe>=2.0 in /home/edward/.local/lib/python3.8/site-packages (from Jinja2<4.0.0,>=3.0.3->aospdtgen==0.1.0) (2.1.1)
Building wheels for collected packages: aospdtgen
Building wheel for aospdtgen (PEP 517) ... done
Created wheel for aospdtgen: filename=aospdtgen-0.1.0-py3-none-any.whl size=63209 sha256=b7467f9c84edabf8f3ab60dcde141b2d7d50df11761d525a45aaef231183b267
Stored in directory: /tmp/pip-ephem-wheel-cache-ypbae0o2/wheels/21/ab/33/92962f9c14ee6bb9ea800fe79cd54d505f94dac906c038ec16
Successfully built aospdtgen
Installing collected packages: aospdtgen
Attempting uninstall: aospdtgen
Found existing installation: aospdtgen 0.1.0
Uninstalling aospdtgen-0.1.0:
Successfully uninstalled aospdtgen-0.1.0
Successfully installed aospdtgen-0.1.0

Running the generator fails.

edward@NRT39609:~/aospdtgen$ python3 -m aospdtgen -h
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/home/edward/aospdtgen/aospdtgen/init.py", line 7, in
from aospdtgen.proprietary_files.section import register_sections
File "/home/edward/aospdtgen/aospdtgen/proprietary_files/section.py", line 3, in
from aospdtgen.proprietary_files.elf import get_needed_shared_libs, get_shared_libs
File "/home/edward/aospdtgen/aospdtgen/proprietary_files/elf.py", line 18, in
def get_shared_libs(files: list[Path]):
TypeError: 'type' object is not subscriptable

Never mind. Solved it by installing git python. And manual installed python 3.10.