pycallgraph icon indicating copy to clipboard operation
pycallgraph copied to clipboard

PyCallGraph builds a 2 mb all black file.

Open rawrgulmuffins opened this issue 9 years ago • 4 comments

I'm trying to run PyCallGraph on a decently large project and I recieve this warning

dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.653145 to fit

Followed by a pycallgraph.png which is all black.

Here's what my call looks like

    from pycallgraph import PyCallGraph
    from pycallgraph.output import GraphvizOutput
    with PyCallGraph(output=GraphvizOutput()):
        run_parsers(cluster_path=sys.argv[1])

Running this on python 2.7 Ubuntu 14.04 Pip 1.5.6 pycallgraph 1.0.1

rawrgulmuffins avatar Jan 20 '15 23:01 rawrgulmuffins

Seems like graphviz has built in abilities to render large graphs. http://stackoverflow.com/questions/238724/visualizing-undirected-graph-thats-too-large-for-graphviz

rawrgulmuffins avatar Jan 20 '15 23:01 rawrgulmuffins

Never mind, sfdp is for undirected graphs.

rawrgulmuffins avatar Jan 20 '15 23:01 rawrgulmuffins

This test script also causes pycallgraph to explode. I might be doing bad stuff to you script. =P

import wtforms
from flask import Flask, request, render_template
from wtforms import Form, StringField, validators, PasswordField, DateField

app = Flask(__name__)

class AddUserForm(Form):
    email = StringField(('Email'), [validators.DataRequired()])
    password = PasswordField('Password', [validators.DataRequired()])
    join_date = DateField(
        'Join Date',
        [validators.DataRequired()],
        format='%Y-%m-%d',)

@app.route('/', methods=['GET', 'POST'])
def add():
    form = AddUserForm(request.form)
    print form.data
    if request.method == 'POST' and form.validate():
        print("post happened")
    print form.errors
    return render_template('hello.html', form=form)

if __name__ == "__main__":
    #run install.py to install dependencies and create the database
    app.run(host="0.0.0.0", port=5000, debug=True)

rawrgulmuffins avatar Jan 20 '15 23:01 rawrgulmuffins

@rawrgulmuffins Sorry for the super later reply.

There might just be too large of an image for graphviz to handle?

gak avatar Oct 30 '15 07:10 gak