Skip to content

Pylint depends on Graphviz & crashes if missing / Improve report-graph usage #228

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

Closed
pylint-bot opened this issue May 2, 2014 · 2 comments
Labels
Bug 🪲 Configuration Related to configuration

Comments

@pylint-bot
Copy link

Originally reported by: Emile Anclin (BitBucket: anclin, GitHub: @Anclin?)


Pylint's report graphs depends on Graphviz since it uses logilab.common.graph.DotBackend which just checks the extension of the output file.

But it took me a long road to figure out how to even to trigger this problem. (It is deactivated either by "-E" or "-rn", which is not totally obvious from the documention; and I used these options because I was only interested in the dependency graph -- which makes sense to me).
I found someone on stackoverflow complaining about the same issue; so
I used his .pylintrc file and triggered another bug:

#!bash

IOError: [Errno 2] No such file or directory: '/home/<my_username>/~/~/gr.dot'

ihmo it proves that it is seldom used, and I would move it to Pyreverse ;)
(I was preparing to pull-request a small patch for #168, but then I remembered Pylint's graph generation...)


@pylint-bot
Copy link
Author

Original comment by Emile Anclin (BitBucket: anclin, GitHub: @Anclin?):


So here is the simple way to trigger the crash (without .pylintrc):

#!bash

pylint --import-graph=my_output_file.svg /path/to/somefile.py
[...]
    make_graph(filename, dep_info, sect, '')
  File "/home/e1000/src/pylint/checkers/imports.py", line 117, in make_graph
    dependencies_graph(filename, dep_info)
  File "/home/e1000/src/pylint/checkers/imports.py", line 110, in dependencies_graph
    printer.generate(filename)
  File "/home/e1000/src/logilab/common/graph.py", line 123, in generate
    shell=use_shell)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@pylint-bot pylint-bot added Bug 🪲 Configuration Related to configuration labels Dec 9, 2015
@Pierre-Sassoulas
Copy link
Member

This crash does not happen anymore in the latest version.

msuozzo pushed a commit to msuozzo/pylint that referenced this issue Feb 18, 2022
Also, drop fossil script (created with old name).

Closes pylint-dev#227.
Closes pylint-dev#228.
Closes pylint-dev#229.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Configuration Related to configuration
Projects
None yet
Development

No branches or pull requests

2 participants