Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue on dot() #3

wants to merge 1 commit into
base: master


Copy link

FXTi commented Aug 26, 2019

bytecode_graph broke on this script

import bytecode_graph 
from dis import opmap
import sys
import marshal

pyc_file = open(sys.argv[1], "rb").read()
pyc = marshal.loads(pyc_file[8:])
bcg = bytecode_graph.BytecodeGraph(pyc)
graph = bytecode_graph.Render(bcg, pyc).dot()

Error info:

Traceback (most recent call last):
  File "./", line 9, in <module>
    graph = bytecode_graph.Render(bcg, pyc).dot()
  File "/tmp/flare-bytecode_graph/bytecode_gra/", line 112, in dot
    lbl = disassemble(, start=start.addr, stop=stop.addr+1,
AttributeError: 'NoneType' object has no attribute 'addr'

I've fixed this issue. : )

And this is test pyc file:

@FXTi FXTi changed the title Fix break issue on dot() Fix an issue on dot() Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.