-
Notifications
You must be signed in to change notification settings - Fork 214
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
Playground not working due to incorrect mimetype in index.js #245
Labels
Comments
Thanks for reporting @parkerhancock |
No problem! Also, if it helps, this issue is present on Windows PC's, but not Mac's. The identical example works fine on OSX. |
Source of issue is: https://bugs.python.org/issue43975 |
Seems that mitigation is: https://docs.python.org/3/library/mimetypes.html#mimetypes.init |
eyurtsev
added a commit
that referenced
this issue
Nov 27, 2023
This PR fixes handling of mimetypes on windows machines: Needed due to issue: https://bugs.python.org/issue43975 Resolves issue: #245 Chose not to use mimetypes.init since that's using a singleton pattern and worried that users will be likely to run into issues since the server may be parsing files which may also end up using mimetype guessing based on file extension
@eyurtsev how to fix the langserve playground not found error. Thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't get the playground to load when using langserve because the index.js file is served with the mimetype "text/plain" and thus my browser (Chrome/Brave/Firefox) refuse to run it. Here are the response headers as reported by Chrome DevTools:
So, there are two problems here:
On 2, the HTML source code for the playground endpoint looks like this:
And thus, when the page fails to load, because the try/catch block does nothing, no informative error message is returned.
The text was updated successfully, but these errors were encountered: