Пидо плохо играет с разрывами строк?

Не в сети - Ubuntu 12.04, python 2.7, используя pydot 1.0.2

Я пытаюсь заставить pydot распечатать дерево в .png. Я делаю мои узлы так:

subnode = pydot.Node(fullstr, label = c + "\n" + n)
graph.add_node(subnode)

Вот,c а такжеn а такжеfullstr это просто строки.

Это хорошо, но когда я бегу:

graph.write_png(output_path)

Я получаю следующую ошибку (yikes!) - следите за обновлениями после перерыва

Traceback (most recent call last):
  File "Ant.py", line 47, in <module>
    f.makeOutput("output/ant", display=True)
  File "/home/aespielberg/ppr/ppr/svggen/library/api/component.py", line 322, in makeOutput
    self.makeComponentTree(filedir + "/tree.png")
  File "/home/aespielberg/ppr/ppr/svggen/library/api/component.py", line 267, in makeComponentTree
    graph.write_png(fn)
  File "/usr/lib/pymodules/python2.7/pydot.py", line 1602, in <lambda>
    lambda path, f=frmt, prog=self.prog : self.write(path, format=f, prog=prog))
  File "/usr/lib/pymodules/python2.7/pydot.py", line 1696, in write
    dot_fd.write(self.create(prog, format))
  File "/usr/lib/pymodules/python2.7/pydot.py", line 1796, in create
    status, stderr_output) )
pydot.InvocationException: Program terminated with status: 1. stderr follows: Warning: /tmp/tmpU5z0G8:2: string ran past end of line
Warning: /tmp/tmpU5z0G8:4: string ran past end of line
Error: /tmp/tmpU5z0G8:5: syntax error near line 5
context: Root >>>  -- <<<  "Root/front";
Warning: /tmp/tmpU5z0G8:6: string ran past end of line
Warning: /tmp/tmpU5z0G8:8: string ran past end of line
Warning: /tmp/tmpU5z0G8:10: string ran past end of line
Warning: /tmp/tmpU5z0G8:12: string ran past end of line
Warning: /tmp/tmpU5z0G8:14: string ran past end of line
Warning: /tmp/tmpU5z0G8:16: string ran past end of line
Warning: /tmp/tmpU5z0G8:18: string ran past end of line
Warning: /tmp/tmpU5z0G8:20: string ran past end of line
Warning: /tmp/tmpU5z0G8:22: string ran past end of line
Warning: /tmp/tmpU5z0G8:24: string ran past end of line
Warning: /tmp/tmpU5z0G8:26: string ran past end of line
Warning: /tmp/tmpU5z0G8:28: string ran past end of line
Warning: /tmp/tmpU5z0G8:30: string ran past end of line
Warning: /tmp/tmpU5z0G8:32: string ran past end of line
Warning: /tmp/tmpU5z0G8:34: string ran past end of line
Warning: /tmp/tmpU5z0G8:36: string ran past end of line
Warning: /tmp/tmpU5z0G8:38: string ran past end of line
Warning: /tmp/tmpU5z0G8:40: string ran past end of line
Warning: /tmp/tmpU5z0G8:42: string ran past end of line
Warning: /tmp/tmpU5z0G8:44: string ran past end of line
Warning: /tmp/tmpU5z0G8:46: string ran past end of line
Warning: /tmp/tmpU5z0G8:48: string ran past end of line
Warning: /tmp/tmpU5z0G8:50: string ran past end of line
Warning: /tmp/tmpU5z0G8:52: string ran past end of line
Warning: /tmp/tmpU5z0G8:54: string ran past end of line
Warning: /tmp/tmpU5z0G8:56: string ran past end of line
Warning: /tmp/tmpU5z0G8:58: string ran past end of line
Warning: /tmp/tmpU5z0G8:60: string ran past end of line
Warning: /tmp/tmpU5z0G8:62: string ran past end of line
Warning: /tmp/tmpU5z0G8:64: string ran past end of line
Warning: /tmp/tmpU5z0G8:66: string ran past end of line
Warning: /tmp/tmpU5z0G8:68: string ran past end of line
Warning: /tmp/tmpU5z0G8:70: string ran past end of line
Warning: /tmp/tmpU5z0G8:72: string ran past end of line
Warning: /tmp/tmpU5z0G8:74: string ran past end of line
Warning: /tmp/tmpU5z0G8:76: string ran past end of line
Warning: /tmp/tmpU5z0G8:78: string ran past end of line
Warning: /tmp/tmpU5z0G8:80: string ran past end of line
Warning: /tmp/tmpU5z0G8:82: string ran past end of line
Warning: /tmp/tmpU5z0G8:84: string ran past end of line
Warning: /tmp/tmpU5z0G8:86: string ran past end of line
Warning: /tmp/tmpU5z0G8:88: string ran past end of line
Warning: /tmp/tmpU5z0G8:90: string ran past end of line
Warning: /tmp/tmpU5z0G8:92: string ran past end of line
Warning: /tmp/tmpU5z0G8:94: string ran past end of line
Warning: /tmp/tmpU5z0G8:96: string ran past end of line
Warning: /tmp/tmpU5z0G8:98: string ran past end of line
Warning: /tmp/tmpU5z0G8:100: string ran past end of line
Warning: /tmp/tmpU5z0G8:102: string ran past end of line
Warning: /tmp/tmpU5z0G8:104: string ran past end of line
Warning: /tmp/tmpU5z0G8:106: string ran past end of line
Warning: /tmp/tmpU5z0G8:108: string ran past end of line
Warning: /tmp/tmpU5z0G8:110: string ran past end of line
Warning: /tmp/tmpU5z0G8:112: string ran past end of line
Warning: /tmp/tmpU5z0G8:114: string ran past end of line
Warning: /tmp/tmpU5z0G8:116: string ran past end of line
Warning: /tmp/tmpU5z0G8:118: string ran past end of line
Warning: /tmp/tmpU5z0G8:120: string ran past end of line
Warning: /tmp/tmpU5z0G8:122: string ran past end of line
Warning: /tmp/tmpU5z0G8:124: string ran past end of line
Warning: /tmp/tmpU5z0G8:126: string ran past end of line
Warning: /tmp/tmpU5z0G8:128: string ran past end of line
Warning: /tmp/tmpU5z0G8:130: string ran past end of line
Warning: /tmp/tmpU5z0G8:132: string ran past end of line
Warning: /tmp/tmpU5z0G8:134: string ran past end of line
Warning: /tmp/tmpU5z0G8:136: string ran past end of line
Warning: /tmp/tmpU5z0G8:138: string ran past end of line
Warning: /tmp/tmpU5z0G8:140: string ran past end of line
Warning: /tmp/tmpU5z0G8:142: string ran past end of line
Warning: /tmp/tmpU5z0G8:144: string ran past end of line
Warning: /tmp/tmpU5z0G8:146: string ran past end of line
Warning: /tmp/tmpU5z0G8:148: string ran past end of line
Warning: /tmp/tmpU5z0G8:150: string ran past end of line
Warning: /tmp/tmpU5z0G8:152: string ran past end of line
Warning: /tmp/tmpU5z0G8:154: string ran past end of line
Warning: /tmp/tmpU5z0G8:156: string ran past end of line
Warning: /tmp/tmpU5z0G8:158: string ran past end of line
Warning: /tmp/tmpU5z0G8:160: string ran past end of line
Warning: /tmp/tmpU5z0G8:162: string ran past end of line
Warning: /tmp/tmpU5z0G8:164: string ran past end of line
Warning: /tmp/tmpU5z0G8:166: string ran past end of line
Warning: /tmp/tmpU5z0G8:168: string ran past end of line

Я потерял тебя во всем этом? Все еще со мной?

Если я удаляю разрыв строки, он работает отлично - без ошибок.

Итак, мой вопрос: как я могу получить разрывы строк, если символ прерывания строки приводит к тому, что он так запутывается? И с чего бы разрыв строки вызвал такую ​​ошибку для начала?

Ответы на вопрос(1)

Ваш ответ на вопрос