Skip to content

Error And Fix : 'NoneType' object has no attribute 'static_symbols' #144

@BuJiang5De

Description

@BuJiang5De

Describe the bug
The type error occurred in the check of the variable.
The interpreter is assigned the empty string (“”)when runing my example. But the code uses “None Type” to check the interpreter. It will come into “IF” unexpectedly. And it will cause NoneType Error.

To Reproduce
Error:
File "\zelos_test\venv\lib\site-packages\zelos\ext\platforms\linux\parse.py", line 107, in parse
for symbol in binary.static_symbols:
AttributeError: 'NoneType' object has no attribute 'static_symbols'

Fix
Modify the file:ext\platforms\linux\parse.py
if (interpreter is not None):
to
if (interpreter is not None) and (interpreter is not ""):

XD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions