graph_models error with pydot lastest version
See original GitHub issueI’m working with python 2.7.11+ and latest version of pydot (1.2.2) and pyparsing (2.1.5). When I run:
django-admin graph_models -o models.png
I get:
Traceback (most recent call last): File "/home/ebujeque/.virtualenvs/gmp/bin/django-admin", line 11, in <module> sys.exit(execute_from_command_line()) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django_extensions/management/utils.py", line 58, in inner ret = func(self, *args, **kwargs) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django_extensions/management/commands/graph_models.py", line 164, in handle self.render_output_pydot(dotdata, **options) File "/home/ebujeque/.virtualenvs/gmp/local/lib/python2.7/site-packages/django_extensions/management/commands/graph_models.py", line 221, in render_output_pydot graph.write(output_file, format=format) AttributeError: 'list' object has no attribute 'write'
I tried with pyparsing(1.5.7) and pydot(1.2.2), but it fails too. I solved it with:
- pyparsing==1.5.7
- pydot=1.1.0
But It can’t work with lastest version of both libraries.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top GitHub Comments
sorry, i see this hasn’t made it into a release yet 😦
hope to have a new release out soon !
On line 220 of the latest version https://github.com/django-extensions/django-extensions/blob/master/django_extensions/management/commands/graph_models.py#L220 the above patch/fix is already incorporated.