-
Notifications
You must be signed in to change notification settings - Fork 318
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
Internal Error for too large Javascript files included with ui.inline_script
#977
Comments
@bminixhofer - Thank you for the detailed report.
Agree, this needs fixing.
This is unexpected. Did you experience this in H2O Cloud, or locally? |
Oh, that makes sense. I still got an error with
I guess I should open a separate issue here - we are dealing with some large files (predictions, model weights etc.) with a couple hundred MB, which we want to make available for download. I'm running Wave locally, and with the following code: from h2o_wave import Q, main, app, ui
import time
@app("/demo")
async def serve(q: Q):
start = time.time()
(url,) = await q.site.upload(["data.dump"])
upload_time = time.time() - start
print(f"upload time: {upload_time}")
q.page['meta'] = ui.meta_card(box='')
q.page["meta"].redirect = f"http://localhost:10101/{url}"
await q.page.save() I get
i.e. it takes ~ 33 seconds for a 100MB file to start downloading. Since the file only has to be copied to a location on the same machine, I'd expect the download to start almost immediately, or am I missing something? |
I can't reproduce this right now so in my opinion this part is solved by 006e282 . Should I open a separate issue for the upload speed problems? |
I opened a new issue here: #982 |
Wave SDK Version, OS
0.17.0, Linux
Actual behavior
Including
plotly
as inline script via:fails with
Interestingly, I could not reproduce this in a minimal example app using the same script. However, using the unminified version from https://cdnjs.cloudflare.com/ajax/libs/plotly.js/1.33.1/plotly.js does the trick.
Expected behavior
I would expect no error to be thrown, or a more informative error message that the size is too large.
Now, since my app has to work offline, I have to create a
NamedTemporaryFile
with the minified plotly and useq.site.upload
(which is also slower than I would expect) to upload the file, thenui.script(...)
to include it as a non-inline script.Steps To Reproduce
wget https://cdnjs.cloudflare.com/ajax/libs/plotly.js/1.33.1/plotly.js
app.py
The text was updated successfully, but these errors were encountered: