一見すると、正しいGraphvizソースがレンダリング時にエラーを発生させます。

一見すると、正しいGraphvizソースがレンダリング時にエラーを発生させます。

特別な状況に直面するようになりました。2.44.1WindowsとDebianの2つの環境に2つのバージョンのGraphvizがインストールされています2.40.1。私が作成したチャートは両方とも同じソースを生成しますが、DebianではレンダリングされませんSyntax error on line 37 near [

私が知っている限り、私はLinux環境を元に設定し、パッケージをインストールして実行しましたsudo dot -c。それで、2つの問題があるかもしれないと思います。ファイルが間違っているか修正されたバグです。新しいバージョンでは。ただし、2番目の仮説をテストすることはできません。変更ログはい極度にシンプルさのための最新のアップデート。しかし、私はできる少なくとも間接的に最初のものをテストしてください。 Debian環境はLinux用のWindowsサブシステムにあるため、Windowsファイルシステムにファイルをコピーして、同じファイルが最新バージョンを使用してレンダリングされることを確認できました。したがって、これはバージョンの問題である可能性があることを示します。また、ファイルには無効な特殊文字が含まれておらず、Notepad ++を使用した手動チェックによって検証されました。

私は2つのことを試しました:1)最新のパッケージを探しています - PythonのCondaまたはDebianバックポートには存在しません(これが私の知る限りです)。源泉。しかし、私はLinuxでソースパッケージを構築した経験がほとんどなく、失敗しました。形式pngが認識されず、私が収集した内容によれば、いくつかの依存関係の問題があります。要件にリストされているいくつかのライブラリ(zlibなど)もDebianリポジトリにないため、もう一度迷惑になります。

この質問がStack Exchangeに完全には適していないことを知っていますが、この問題のデバッグ中に試したことを広く説明しましたが、まだ何も得られていないと思います。まだメンテナンススタッフを気にしたくなかったので、ここで幸運を試してみることにしました。次の質問に対するあなたの回答に心から感謝します。

  • 通常、最新バージョンのパッケージ、特にGraphvizパッケージをインストールする他の簡単な方法はありますか?
  • Graphviz環境を使用している他の人が、次のソースファイルが私が説明したようなエラーを生成するのか、それともコンパイルしているのかを確認できますか?使用されますdot -Kdot -Tpng -O source
digraph  {
__author__ [fillcolor="#E5E5E5", label=" __author__ \nV:22", shape=box, style=filled];
__version__ [fillcolor="#E5E5E5", label="__version__ \nV:23", shape=box, style=filled];
__license__ [fillcolor="#E5E5E5", label="__license__ \nV:24", shape=box, style=filled];
PY3 [fillcolor="#E4FFE4", label="    PY3     \nV:27", shape=box, style=filled];
GRAPH_ATTRIBUTES [fillcolor="#E4FFE4", label="GRAPH_ATTRIBUTES\nV:34", shape=box, style=filled];
EDGE_ATTRIBUTES [fillcolor="#E4FFE4", label="EDGE_ATTRIBUTES\nV:52", shape=box, style=filled];
NODE_ATTRIBUTES [fillcolor="#E4FFE4", label="NODE_ATTRIBUTES\nV:66", shape=box, style=filled];
CLUSTER_ATTRIBUTES [fillcolor="#E4FFE4", label="CLUSTER_ATTRIBUTES\nV:77", shape=box, style=filled];
DEFAULT_PROGRAMS [fillcolor="#E4FFE4", label="DEFAULT_PROGRAMS\nV:83", shape=box, style=filled];
is_windows [fillcolor="#E4FFE4", label=" is_windows \nF:93", shape=ellipse, style=filled];
is_anaconda [fillcolor="#E4FFE4", label="is_anaconda \nF:98", shape=ellipse, style=filled];
get_executable_extension [fillcolor="#FFFFFF", label="get_executable_extension\nF:104", shape=ellipse, style=filled];
call_graphviz [fillcolor="#FFFFFF", label="call_graphviz\nF:112", shape=ellipse, style=filled];
frozendict [fillcolor="#FFFFFF", label=" frozendict \nC:152", shape=parallelogram, style=filled];
dot_keywords [fillcolor="#E4FFE4", label="dot_keywords\nV:202", shape=box, style=filled];
id_re_alpha_nums [fillcolor="#E4FFE4", label="id_re_alpha_nums\nV:204", shape=box, style=filled];
id_re_alpha_nums_with_ports [fillcolor="#E4FFE4", label="id_re_alpha_nums_with_ports\nV:205", shape=box, style=filled];
id_re_num [fillcolor="#E4FFE4", label=" id_re_num  \nV:207", shape=box, style=filled];
id_re_with_port [fillcolor="#E4FFE4", label="id_re_with_port\nV:208", shape=box, style=filled];
id_re_dbl_quoted [fillcolor="#E4FFE4", label="id_re_dbl_quoted\nV:209", shape=box, style=filled];
id_re_html [fillcolor="#E4FFE4", label=" id_re_html \nV:210", shape=box, style=filled];
needs_quotes [fillcolor="#FFE0E0", label="needs_quotes\nF:213", shape=ellipse, style=filled];
quote_if_necessary [fillcolor="#FFE0E0", label="quote_if_necessary\nF:249", shape=ellipse, style=filled];
graph_from_dot_data [fillcolor="#E4FFE4", label="graph_from_dot_data\nF:275", shape=ellipse, style=filled];
graph_from_dot_file [fillcolor="#BBEEFF", label="graph_from_dot_file\nF:287", shape=ellipse, style=filled];
graph_from_edges [fillcolor="#BBEEFF", label="graph_from_edges\nF:306", shape=ellipse, style=filled];
Dot [fillcolor="#FFE0E0", label="    Dot     \nC:1694", shape=parallelogram, style=filled];
Edge [fillcolor="#FFA0A0", label="    Edge    \nC:692", shape=parallelogram, style=filled];
graph_from_adjacency_matrix [fillcolor="#BBEEFF", label="graph_from_adjacency_matrix\nF:341", shape=ellipse, style=filled];
graph_from_incidence_matrix [fillcolor="#BBEEFF", label="graph_from_incidence_matrix\nF:378", shape=ellipse, style=filled];
Common [fillcolor="#E4FFE4", label="   Common   \nC:415", shape=parallelogram, style=filled];
Error [fillcolor="#E4FFE4", label="   Error    \nC:549", shape=parallelogram, style=filled];
InvocationException [fillcolor="#E5E5E5", label="InvocationException\nC:558", shape=parallelogram, style=filled];
Node [fillcolor="#FFE0E0", label="    Node    \nC:568", shape=parallelogram, style=filled];
Cluster [fillcolor="#FFE0E0", label="  Cluster   \nC:1639", shape=parallelogram, style=filled];
Subgraph [fillcolor="#FFFFFF", label="  Subgraph  \nC:1585", shape=parallelogram, style=filled];
Graph [fillcolor="#FFE0E0", label="   Graph    \nC:887", shape=parallelogram, style=filled];
get_executable_extension -> is_windows;
get_executable_extension -> is_anaconda;
call_graphviz -> get_executable_extension;
call_graphviz -> DEFAULT_PROGRAMS;
frozendict -> frozendict;
needs_quotes -> id_re_dbl_quoted;
needs_quotes -> needs_quotes;
needs_quotes -> dot_keywords;
needs_quotes -> id_re_alpha_nums_with_ports;
needs_quotes -> id_re_num;
needs_quotes -> id_re_alpha_nums;
needs_quotes -> id_re_html;
needs_quotes -> id_re_with_port;
quote_if_necessary -> needs_quotes;
graph_from_dot_file -> PY3;
graph_from_dot_file -> graph_from_dot_data;
graph_from_edges -> Dot;
graph_from_edges -> Edge;
Dot -> PY3;
Dot -> Graph;
Dot -> call_graphviz;
Edge -> quote_if_necessary;
Edge -> Cluster;
Edge -> Edge;
Edge -> PY3;
Edge -> Common;
Edge -> Subgraph;
Edge -> Node;
Edge -> frozendict;
Edge -> Error;
Edge -> EDGE_ATTRIBUTES;
graph_from_adjacency_matrix -> Dot;
graph_from_adjacency_matrix -> Edge;
graph_from_incidence_matrix -> Dot;
graph_from_incidence_matrix -> Edge;
Node -> quote_if_necessary;
Node -> Common;
Node -> NODE_ATTRIBUTES;
Cluster -> quote_if_necessary;
Cluster -> CLUSTER_ATTRIBUTES;
Cluster -> Graph;
Subgraph -> Graph;
Graph -> quote_if_necessary;
Graph -> Edge;
Graph -> Cluster;
Graph -> Common;
Graph -> Node;
Graph -> GRAPH_ATTRIBUTES;
Graph -> Error;
Graph -> Graph;
Graph -> Subgraph;
}

ベストアンサー1

おすすめ記事