django-extensions/django-extensions — Issue #140: error running graph_models
Author: neilp9
Created: 2011-10-15 19:15:17+00:00
State: open

Hello,

Thanks for this awesome functionality. I have running into an error running graph_models on my django project. The error is:

anitya-2:otalo neil$ python manage.py graph_models -a -g -o otalo.png
Traceback (most recent call last):
File "manage.py", line 28, in
execute_manager(settings)
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/__init__.py", line 362, in execute_manager
utility.execute()
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/__init__.py", line 303, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/base.py", line 222, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.6/site-packages/django_extensions-0.7-py2.6.egg/django_extensions/management/commands/graph_models.py", line 39, in handle
dotdata = generate_dot(args, **options)
File "/Library/Python/2.6/site-packages/django_extensions-0.7-py2.6.egg/django_extensions/management/modelviz.py", line 236, in generate_dot
(field.rel.through and field.rel.through._meta.auto_created)): # django 1.2
AttributeError: 'str' object has no attribute '_meta'

There are three models.py for this project, they are online from here:
http://www.google.com/codesearch#search&q=models.py+package:http://avaajotalo\.googlecode\.com

My guess is that there is a problem graphing some of the many-to-many/through relationships in AO/models.py, but not sure. Thanks in advance for your help!