-
hey, I'm following the example for Lightwave on this medium page I'm getting mime type errors. I'm running this in a virtual env on Windows and have tried both python 3.10 and 3.11. I saw on the release page for non-light wave that there was a fix implemented for this on Windows in v0.25.0, but I have v0.25.2 and I can't figure out a fix. I tried downgrading as well but no luck. Error from dev console: Loading module from “http://127.0.0.1:8000/wave-static/index-98d98a8e.js” was blocked because of a disallowed MIME type (“text/plain”) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey! Welcome to Windows lol. This is caused by bad windows registry defaults. You can read more here. TLDR: You either need to change your registry or hack around it: import mimetypes
mimetypes.add_type('application/javascript', '.js')
mimetypes.add_type('text/css', '.css')
mimetypes.add_type('image/svg+xml', '.svg')
Correct. However, this does only apply to H2O Wave since it comes with its own server that hosts the assets like JS/CSS etc.
Since Lightwave assets need to be served by an upstream framework (e.g. fastapi), you need to refer to that one wrt to serving static assets. |
Beta Was this translation helpful? Give feedback.
Hey!
Welcome to Windows lol. This is caused by bad windows registry defaults. You can read more here.
TLDR: You either need to change your registry or hack around it:
Correct. However, this does only apply to H2O Wave since it comes with its own server that hosts the assets like JS/CSS etc.
Since…