-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
IndexError occurs when markdown chat message that gets streamed out has incomplete markdown URLs. #6520
Comments
Can reproduce; I think the right behavior would be silencing these errors from markup if possible?
Or maybe submitting an issue upstream to mdurl?
|
@ahuang11 thank you for commenting! I think there's possibly a good reason for the behavior in
The line `if rest[host_end - 1] == ":"` in the provided source code plays a specific role in parsing and handling URLs. Let's break it down to understand its purpose:
By meticulously examining each part of the URL and correctly interpreting characters like ":", the parser can effectively distinguish between different components of the URL, ensuring that applications using this code can correctly access and manipulate URL data. If we were to silence the errors within Panel, should there be a try/except block? Just trying to explore what the solution space might look like first, though. |
I'm not exactly sure how to catch this error specifically since it's just a generic IndexError. I'm leaning more towards raising this issue upstream to either Would like others' feedback though. |
Hmm, I agree with raising an issue upstream but I don't think there's any condition where I want an actual error to be raised to the user when markdown parsing fails. I'd say we do want to catch the error on our side and turn it into a warning, and then perhaps fall back to an alternate markdown parser or simply render the output as empty?! |
ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
Libraries:
Description of expected behavior and the observed behavior
I am encountering an issue when trying to render content inside a holoviz chat message. Specifically, I'm streaming out markdown-renderable text, and the error occurs when the text includes a colon character. The expected behavior is that the chat message renders the markdown text without errors, including links formatted in markdown.
Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
The error message is as follows:
Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered: