我正在尝试获取我的应用程序的 graph_models。我已经做过一次了,但现在我遇到了这个错误,我无法找到解决问题的方法。
追溯:
$ python manage.py graph_models --pygraphviz -a -g -o m.png
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django\core\management\__init_
_.py", line 351, in execute_from_command_line
utility.execute()
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django\core\management\__init_
_.py", line 343, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django\core\management\base.py
", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django\core\management\base.py
", line 445, in execute
output = self.handle(*args, **options)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django_extensions\management\u
tils.py", line 57, in inner
ret = func(self, *args, **kwargs)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django_extensions\management\c
ommands\graph_models.py", line 87, in handle
self.render_output_pygraphviz(dotdata, **options)
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\django_extensions\management\c
ommands\graph_models.py", line 133, in render_output_pygraphviz
graph.layout(prog=kwargs['layout'])
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\pygraphviz\agraph.py", line 13
58, in layout
data = self._run_prog(prog, ' '.join([args, "-T", fmt]))
File "c:\Users\myUser\.virtualenvs\my_django_project\lib\site-packages\pygraphviz\agraph.py", line 13
38, in _run_prog
warnings.warn(b"".join(errors), RuntimeWarning)
TypeError: can't use a string pattern on a bytes-like object
我试过什么?
- 评论了
INSTALLED_APPS
(一一:'debug_toolbar'上次工作时已经存在问题) python manage.py graph_models --pygraphviz -g -o m.png my_app_01
(my_app_02、03 等)git checkout ###
(到它最后一次工作,以及不同的提交)
什么都没有发生,实际上,因为3.
我怀疑我的应用程序之外的事情可能正在发生。否则,如果之前有效,为什么在曾经有效的提交中不再有效?
那么......关于如何找到解决方案的任何想法?谢谢你的时间!(我很抱歉英语不好)