SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

Jupyter server extension 404 #302

Closed hardreddata closed 5 years ago

hardreddata commented 5 years ago

Thanks for making this great library available.

I found some commented out advice in the readme markdown. I wanted to confirm if it is still current.

The code below works but when I visit the URL, having modified the example below to point to a markdown file I get a 404 error.

jupyter serverextension enable --py scriptedforms
jupyter notebook --NotebookApp.default_url=/scriptedforms/use/quick-start.md

It seems to be installed ok when I list the server extensions

    scriptedforms  enabled 
    - Validating...
      scriptedforms 0.10.1 OK

The usual Jupyter notebook interface loads fine. As does running scriptedforms directly on a markdown file.

I hope to make scriptedforms available for others and think this means I require the above and JupyterHub. Note that I am using the pip package and have not cloned git.

Any advice is appreciated.

SimonBiggs commented 5 years ago

Hi @RussellGrew,

The following three steps work for me. Do these work for you?

pip install scriptedforms
echo "# Hello World" > test.md
jupyter notebook --NotebookApp.default_url=/scriptedforms/use/test.md

Cheers,

Simon

hardreddata commented 5 years ago

Hi Simon,

Thanks for that prompt response.

I see my problem now.

I am new to Jupyter and thought /scriptedforms/use in the url referred to a path on disk. In your example I have been

jupyter notebook --NotebookApp.default_url=test.md

It works perfectly now.

Cheers.

SimonBiggs commented 5 years ago

Awesome :) All good :). Glad to help. Let me know how it goes.

I actually wanted to make a JupyterHub docker image that runs scriptedforms so that people can begin right away with a shared server. Never got around to it though...

hardreddata commented 5 years ago

Is there a trick to making it work inside JupyterHub? I figure you have this in hand in order to be deployed on mybinder?

I have been reading #59 and #241 but don't seem to be able to make it happen.

Good luck with the Docker image. I possibly almost have a crude one here but without the requisite Postgres and mount points you envisioned.

Thanks again.

SimonBiggs commented 5 years ago

That's okay. Anything you might have would be better than nothing. It'd be a good start. Did you want to make a pull request?

Here is the mybinder repo if that helps:

https://github.com/SimonBiggs/scriptedforms-examples

On Mon., 22 Apr. 2019, 12:29 pm RussellGrew, notifications@github.com wrote:

Is there a trick to making it work inside JupyterHub? I figure you have this in hand in order to be deployed on mybinder?

I have been reading #59 https://github.com/SimonBiggs/scriptedforms/issues/59 and #241 https://github.com/SimonBiggs/scriptedforms/issues/241 but don't seem to be able to make it happen.

Good luck with the Docker image. I possibly almost have a crude one here but without the requisite Postgres and mount points you envisioned.

Thanks again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SimonBiggs/scriptedforms/issues/302#issuecomment-485306052, or mute the thread https://github.com/notifications/unsubscribe-auth/ABSBK63GBFGFAFTQQCUVB6DPRUPHHANCNFSM4HHMQHYA .

hardreddata commented 5 years ago

I very much cheated and started at

docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub

and did some upgrades in the shell. If I get around to doing something more scripted I will be in touch.

Presently I have jupyterhub running outside docker with conda. I just installed jupyter-lab and then rebuilt it (on its recommendation) but am not getting anywhere. If you didn't do anything additional with your mybinder setup I will keep pecking away at this when time allows.

Thanks.