NetworkX error while loading pajek network
up vote
0
down vote
favorite
I'm trying to load a network in pajek format .net into a graph in python. It seems to be an easy task, but I'm getting an error that I don't understand:
Traceback (most recent call last):
File "insta.py", line 4, in <module>
G = nx.read_pajek("instaedges.net")
File "<decorator-gen-588>", line 2, in read_pajek
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxutilsdecorators.py", line 240, in _open_file
result = func_to_be_decorated(*new_args, **kwargs)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxpajek.py", line 163, in read_pajek
return parse_pajek(lines)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxreadwritepajek.py", line 205, in parse_pajek
l, nnodes = l.split()
ValueError: too many values to unpack (expected 2)
my code:
import networkx as nx
G = nx.read_pajek("instaedges.net")
print(nx.info(G))
What is the problem here?
I'm using NetworkX 2.2 and python 3.7.0
python networkx pajek
add a comment |
up vote
0
down vote
favorite
I'm trying to load a network in pajek format .net into a graph in python. It seems to be an easy task, but I'm getting an error that I don't understand:
Traceback (most recent call last):
File "insta.py", line 4, in <module>
G = nx.read_pajek("instaedges.net")
File "<decorator-gen-588>", line 2, in read_pajek
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxutilsdecorators.py", line 240, in _open_file
result = func_to_be_decorated(*new_args, **kwargs)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxpajek.py", line 163, in read_pajek
return parse_pajek(lines)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxreadwritepajek.py", line 205, in parse_pajek
l, nnodes = l.split()
ValueError: too many values to unpack (expected 2)
my code:
import networkx as nx
G = nx.read_pajek("instaedges.net")
print(nx.info(G))
What is the problem here?
I'm using NetworkX 2.2 and python 3.7.0
python networkx pajek
1
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to load a network in pajek format .net into a graph in python. It seems to be an easy task, but I'm getting an error that I don't understand:
Traceback (most recent call last):
File "insta.py", line 4, in <module>
G = nx.read_pajek("instaedges.net")
File "<decorator-gen-588>", line 2, in read_pajek
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxutilsdecorators.py", line 240, in _open_file
result = func_to_be_decorated(*new_args, **kwargs)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxpajek.py", line 163, in read_pajek
return parse_pajek(lines)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxreadwritepajek.py", line 205, in parse_pajek
l, nnodes = l.split()
ValueError: too many values to unpack (expected 2)
my code:
import networkx as nx
G = nx.read_pajek("instaedges.net")
print(nx.info(G))
What is the problem here?
I'm using NetworkX 2.2 and python 3.7.0
python networkx pajek
I'm trying to load a network in pajek format .net into a graph in python. It seems to be an easy task, but I'm getting an error that I don't understand:
Traceback (most recent call last):
File "insta.py", line 4, in <module>
G = nx.read_pajek("instaedges.net")
File "<decorator-gen-588>", line 2, in read_pajek
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxutilsdecorators.py", line 240, in _open_file
result = func_to_be_decorated(*new_args, **kwargs)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxpajek.py", line 163, in read_pajek
return parse_pajek(lines)
File "C:UsersMarcinAppDataLocalProgramsPythonPython37-32libsite-packagesnetworkxreadwritepajek.py", line 205, in parse_pajek
l, nnodes = l.split()
ValueError: too many values to unpack (expected 2)
my code:
import networkx as nx
G = nx.read_pajek("instaedges.net")
print(nx.info(G))
What is the problem here?
I'm using NetworkX 2.2 and python 3.7.0
python networkx pajek
python networkx pajek
edited Nov 7 at 11:17
Daniel Mesejo
8,1391922
8,1391922
asked Nov 7 at 11:14
MMis
1
1
1
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11
add a comment |
1
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11
1
1
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188370%2fnetworkx-error-while-loading-pajek-network%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Potentially, "instaedges.net" is not in the correct format. Without the file, this will be impossible to determine though. I would link to the file (put it on github, pastebin or google drive).
– Paul Brodersen
Nov 7 at 17:35
Yes, it semms that it is indeed the problem. Possibly the conversion of formats was faulty. Thanks!
– MMis
Nov 12 at 14:11