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

[Error] Command 'Markdown Links: Show Graph' resulted in an error ([UriError]: Scheme contains illegal characters.) #45

Open
ghost opened this issue Jul 30, 2020 · 16 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2020

Since two days ago I get an error when commanding Markdown Links: Show Graph:

Command 'Markdown Links: Show Graph' resulted in an error ([UriError]: Scheme contains illegal characters.)

I use the "markdown-links.fileIdRegexp": "(?<=^#).+$", setting which I got from here. My folder has ~1.500 files

@felixbinder
Copy link

I get the same error since a few days ago as well, without anything having changed and the default value for fileIdRegexp.

@felixbinder
Copy link

Downgrading the extension to 0.60 makes the graph work again.

@ghost
Copy link
Author

ghost commented Aug 5, 2020

Is there a specific trick to it? I reverted to 0.60 and now I don't even see the Markdown Links: Show Graph command. Even restarting the PC didn't do the trick.

@felixbinder
Copy link

No, I simply right-clicked the extension and installed 0.60. Perhaps you could try to disable and enable it?

@ghost
Copy link
Author

ghost commented Aug 6, 2020

That didn't work for me.

@tchayen
Copy link
Owner

tchayen commented Aug 16, 2020

I believe that below 0.6.0 the command was simply Show Graph (changed to stick to the convention). That might answer why it disappeared for you.

Regarding the scheme problem – I am not sure if it is related to the file ID regexp, but i have no better idea for now how to check it.

@Am3ra
Copy link
Contributor

Am3ra commented Aug 25, 2020

I had the same error, but it was fixed by checking my links. One of my web links was badly mangled, and caused that error. I recommend checking that all your links are correctly formatted.

@nrgapple
Copy link

Yep, downgrading to 0.6.0 worked for me also.

@tchayen
Copy link
Owner

tchayen commented Aug 31, 2020

Ok, so two things would help:

  • Checking what has changed since 0.6.0 in the way parsing happens.
  • Providing better error handling that wouldn't let a parsing error blow the whole graph.

@nrgapple
Copy link

nrgapple commented Sep 1, 2020

@tchayen yes exactly. If the error would point to the file and line in the files that is causing the parsing error that would be extremely helpful

@petterobam
Copy link

message to watch, when fixed then upgrade

@RyanPersson
Copy link

I had this same error occur in v0.80 .

Command 'Markdown Links: Show Graph' resulted in an error ([UriError]: Scheme contains illegal characters.)

I figured it was due to a character sequence in one of my files so I worked through all the changes since my last commit to my notes.
I was able to trace it down to this line added in a markdown file:

[quanta magazine]((https://www.quantamagazine.org/machine-learnings-amazing-ability-to-predict-chaos-20180418/))

Changing the above line to

[quanta magazine](https://www.quantamagazine.org/machine-learnings-amazing-ability-to-predict-chaos-20180418/)

fixes the issue & lets markdown links load normally.

I thought at first that it was because of the double parenthesis. But making a test file with [hello]((world)) in a markdown file does not trigger the issue. So then I thought that it must be because of something in URL syntax, & sure enough
[test]((https://google.com)) reliably triggered it.
I played around with it, and narrowed it down to the colon.
[]((:)) triggers the issue consistently for me, as well as any any string of the form, [text]((text:text)).

As a temporary fix for anyone having the same issue, try searching for ](( and maybe )) to find any links in your markdown files with accidental second parentheses containing a :. Fixing these should resolve the issue.

@tchayen
Copy link
Owner

tchayen commented Oct 1, 2020

Wow, that one is strange. I will try looking for similar issues in remark as this is the underlying Markdown parser and they should have faced that too.

@patchworquill
Copy link

Just had this issue, searched for ages, then found @RyanPersson's solution:

Used VSCode's search for ](( and that found an instance of this glitch! Removed the extra brackets and BOOM! graph working again.

Thanks for the help.

This was referenced Dec 30, 2020
@sadespresso
Copy link

sadespresso commented Jul 13, 2023

I experienced the same issue on v0.8.0, and downgrading to 0.7.0 somehow fixed it...

I have a header with an emoji (✨), that might have caused it. Everything else is valid, escaped URLs (including https:// links).

Just in case this information might be useful :DDD

@AlexisBogroff
Copy link

Same and found the issue in my case: a link contained a double parenthesis

Unfortunately I couldn't find it by looking for "((" as specified above in this discussion, since it was "(<(".

My project contained node_module.
node_module < rollup < CHANGELOG.md < "[#675](<(https://github.com/rollup/rollup/issues/675)>)"

The issue was solved by changing the link into: "[#675](<https://github.com/rollup/rollup/issues/675>)"
i.e. removing the interior parenthesis.

The general misleading pattern was:
Issue: [text](<(link)>)
Solution: [text](<link>)

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

9 participants