1

pajek ファイルに書き込み、Networkx ライブラリ python を使用して同じファイルを読み戻すと、エラーが発生します。

   >>> G=nx.read_pajek("eatRS.net")

   >>> nx.write_pajek(G,"temp.net")

   >>> G1=nx.read_pajek("temp.net")

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "<string>", line 2, in read_pajek
 File "/usr/local/lib/python2.7/dist-packages/networkx/utils/decorators.py", line 193, in _open_file
   result = func(*new_args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/networkx/readwrite/pajek.py", line 132, in read_pajek
   return parse_pajek(lines)
 File "/usr/local/lib/python2.7/dist-packages/networkx/readwrite/pajek.py", line 168, in parse_pajek
splitline=shlex.split(str(next(lines)))
 File "/usr/lib/python2.7/shlex.py", line 279, in split
  return list(lex)
 File "/usr/lib/python2.7/shlex.py", line 269, in next
token = self.get_token()
 File "/usr/lib/python2.7/shlex.py", line 96, in get_token
  raw = self.read_token()
 File "/usr/lib/python2.7/shlex.py", line 172, in read_token
r aise ValueError, "No closing quotation"
 ValueError: No closing quotation
4

1 に答える 1