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

issue with trying to use shinylive to create static version of application #281

Closed
jamieRowen opened this issue Jul 28, 2022 · 5 comments · Fixed by #283
Closed

issue with trying to use shinylive to create static version of application #281

jamieRowen opened this issue Jul 28, 2022 · 5 comments · Fixed by #283

Comments

@jamieRowen
Copy link

Just watched the talk on shiny live. Tried it out on a test application and ran into a couple of issues.

On first run of shiny static test_app/ site i got an error:

FileNotFoundError: [Errno 2] No such file or directory: '/home/jamie/.cache/shiny/shinylive'

I was able to resolve this by creating the shiny directory in .cache which didn't previously exist.

Following that, running the above which kicks off a download of shiny live I get

Creating directory /home/jamie/.cache/shiny/shinylive
/home/jamie/.cache/shiny/shinylive/shinylive-0.0.1dev does not exist.
Downloading https://pyshiny.netlify.app/shinylive/shinylive-0.0.1dev.tar.gz...
Traceback (most recent call last):
  File "/filestore/ubuntu/git/me/python_shiny/.venv/bin/shiny", line 8, in <module>
    sys.exit(main())
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/shiny/_main.py", line 393, in static
    _static.deploy_static(
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/shiny/_static.py", line 55, in deploy_static
    shinylive_bundle_dir = _ensure_shinylive_local(version=version)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/shiny/_static.py", line 275, in _ensure_shinylive_local
    download_shinylive(url=url, version=version, destdir=destdir)
  File "/filestore/ubuntu/git/me/python_shiny/.venv/lib/python3.8/site-packages/shiny/_static.py", line 298, in download_shinylive
    urllib.request.urlretrieve(bundle_url, tmp.name)
  File "/usr/lib/python3.8/urllib/request.py", line 286, in urlretrieve
    raise ContentTooShortError(
urllib.error.ContentTooShortError: <urlopen error retrieval incomplete: got only 172669498 out of 186880432 bytes>
@jamieRowen
Copy link
Author

I could resolve this using

wget https://pyshiny.netlify.app/shinylive/shinylive-0.0.1dev.tar.gz

then unpacking into ~/.cache/shiny/shinylive

@wch
Copy link
Collaborator

wch commented Jul 28, 2022

Yikes, sorry to hear that you ran into this. I’ll try to get this fixed today.

@jamieRowen
Copy link
Author

jamieRowen commented Jul 28, 2022 via email

@wch
Copy link
Collaborator

wch commented Jul 28, 2022

I have a PR that fixes the directory creation issue, but I wasn't able to reproduce the downloading error.

@wch wch closed this as completed in #283 Jul 28, 2022
@jamieRowen
Copy link
Author

Thanks winston. I have tried this and I can no longer recreate the download error. I was trying this just as you were announcing shiny live, I suspect there were probably a few people downloading at the same time. I wonder if that has anything to do with it.

Either way, seems to be ok and thanks for your prompt response

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

Successfully merging a pull request may close this issue.

2 participants