pycallgraph
pycallgraph copied to clipboard
PyCallGraphException: The command "dot -Tpng -oML4AR2 pycallgraph.png C:\Users\XXXX\AppData\Local\Temp\tmpxw3sbjz1" failed with error code 1.
I have repeatedly tried PyCallGraphException with different results. I have gotten it to work with max_depth=4, but not max_depth=5. I do not appear to have a file named "tmpxw3sbjz1" (or similar file with a recent timestamp). Dot is in my path and I can execute the command manually from within Jupyter, but this command ("dot -Tpng -oML4AR2 pycallgraph.png C:\Users\XXXX\AppData\Local\Temp\tmpxw3sbjz1" ) does not work.
Here is the code
from pycallgraph import PyCallGraph
from pycallgraph import Config
from pycallgraph import GlobbingFilter
from pycallgraph.output import GraphvizOutput
pycall_exclude = ['time.*', 'datetime.*', 'dateutil.*', 'argparse.*',
'numpy.*', 'pandas.*', 'yaml.*', 'pickle.*',
'psutil.*', 'sys.*', 'warnings.*', 'sklearn.*',
'collections.*', 'scipy.*', 'tqdm.*', 'os.*',
'logging.*', 'pycallgraph.*']
config = Config(max_depth=5)
config.trace_filter = GlobbingFilter(exclude=pycall_exclude)
graphviz = GraphvizOutput(output_file='ML4AR2 pycallgraph.png')
if __name__ == '__main__':
with PyCallGraph(output=graphviz, config=config):
main()
Here is a description of my environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: en_US_UTF-8
LANG: en_US.UTF-8
LOCALE: English_United States.1252
pandas: 0.24.1
pytest: 4.2.0
pip: 19.0.1
setuptools: 40.7.3
Cython: 0.29.4
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.4
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.9
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.14
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.3.0
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.2.17
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
Please advise
update - doesn't work with max_depth=4 either - but the code its profiling is more complete and longer now, so...