mzLib icon indicating copy to clipboard operation
mzLib copied to clipboard

Read .mzML file report: invalid uri the hostname could not be parsed

Open lonelu opened this issue 7 years ago • 4 comments

I found this is caused by file with something like location="file://." , which is not able to be parsed. I change it to location="file://E:/" Then it is OK. In case anyone meet the same problem in the future.

lonelu avatar Feb 26 '18 20:02 lonelu

can you give an example? I'm not sure I understand

I usually just use something like myFilePath = @"C:\Users\rmillikin\myfile.txt";

rmillikin avatar Feb 26 '18 20:02 rmillikin

I cannot search some public .mzML files in MetaMorpheus, because it report: invalid uri the hostname could not be parsed. Then I check it and found it is the mzLib Mzml.LoadAllStaticData is related with this problem. My guess is that these .mzML files contains something that could not be read by the following code: Mzml.LoadAllStaticData > sourceFile = new SourceFile > new Uri(simpler.location). It turns out it is location="file://." in the .mzML files need to be changed.

lonelu avatar Feb 26 '18 20:02 lonelu

strange. that path is in the mzml file itself? sounds like @dippman might be able to fix this in mzLib

rmillikin avatar Feb 26 '18 20:02 rmillikin

The path is in the mzML file. It is maybe related to filepath created by linux. Because "." means current filepath in linux, which could not read by Windows. What a small weird bug.

lonelu avatar Feb 26 '18 20:02 lonelu