Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open .mtx files from Network Data Repository (networkrepository.com). Not a valid header #37

Closed
joseortiz3 opened this issue Mar 2, 2020 · 2 comments

Comments

@joseortiz3
Copy link

I cannot open any .mtx files from the Network Data Repository. Not sure if it is them providing invalid .mtx files or MatrixMarket.jl not supporting some use-case of the .mtx format.

For instance, the bio-celegans file isn't supported. It looks like:

%MatrixMarket matrix coordinate pattern symmetric
453 453 2025
186 1
207 1
218 1
227 1
228 1
229 1
230 1

MatrixMarket.jl complains:

julia> MatrixMarket.mmread("./networkData/bio-celegans/bio-celegans.mtx")
ERROR: MatrixMarket.ParseError("Not a valid MatrixMarket header:%MatrixMarket matrix coordinate pattern symmetric")
Stacktrace:
 [1] (::MatrixMarket.var"#1#3"{Bool,Bool})(::IOStream) at C:\Users\Joey\.julia\packages\MatrixMarket\ic62N\src\MatrixMarket.jl:38
 [2] #open#271(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::MatrixMarket.var"#1#3"{Bool,Bool}, ::String, ::Vararg{String,N} where N) at .\io.jl:298
 [3] open at .\io.jl:296 [inlined]
 [4] mmread at C:\Users\Joey\.julia\packages\MatrixMarket\ic62N\src\MatrixMarket.jl:30 [inlined] (repeats 2 times)
 [5] top-level scope at none:0
@tkonolige
Copy link
Collaborator

Matrix market headers must start with %%MatrixMarket, yours has only one %.

@joseortiz3
Copy link
Author

joseortiz3 commented Mar 2, 2020

Yep. That fixed it. I will relay the formatting problem to networkrepository.com. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants