0

I want to create demo app by jupyter notebook and appmode and then would like to push to binder. However, after pushing to binder, we can't use appmode in that notebook. Should I do anything special for that?

I tried to add 'environment.yml'

channels:
  - conda-forge
dependencies:
  - appmode

and 'postBuild'


#!/bin/bash

# Appmode Jupyter拡張機能のインストール
jupyter nbextension install --py --symlink --sys-prefix appmode
jupyter nbextension enable --py --sys-prefix appmode

# Appmodeの有効化
jupyter serverextension enable --py --sys-prefix appmode

and 'requirements.txt'

appmode
nemumi
  • 1
  • Because repos need to be public when using mybinder, it is easy to share them. So always include a link to the repo when asking for help about mybinder issues. It's a lot easier for those helping you to be able to test things. One issue I see is you are mixing and matching. Use `environment.yml` or `requirements.txt`. **Not both.** Your `postBuild` should look exactly like [here](https://github.com/oschuett/appmode/blob/master/binder/postBuild). Minor thing: this is tagged wrong; `android-binder` is completely different. Is there a `mybinder tag` or `binder` or `binderhub`? – Wayne Feb 28 '23 at 18:44
  • Also, I'm not sure what you mean by "after pushing to binder"? You push updates to a public repo/archive and then point mybinder.org at that public repository/archive. – Wayne Feb 28 '23 at 18:52
  • Maybe most things are fine and you are running into [this issue](https://github.com/oschuett/appmode/issues/64)? Maybe not though? If that was the case, hopefully you would have described that clearly saying the error you see similar to the way the person describing the issue at that link described it. **There is a workaround for that if that is what is going on.** – Wayne Feb 28 '23 at 19:13

1 Answers1

0

I'm going to guess you ran into this issue. A workaround to allow the appmode to work again at present without a '400: Bad Request' page is there. I've tested it in sessions launched via MyBinder and it presently enables appmode to work again.

You need to add a file named jupyter_notebook_config.py in the root of your repo. The contents of that file should be:

c.ContentsManager.allow_hidden = True

I tested it already in conjunction with using a binder directory for the my binder configuration files. The jupyter_notebook_config.py stays in the root of the repo and does NOT belong inside the binder directory. (This is demonstrated by this launch, which corresponds to this particular commit of that repo with jupyter_notebook_config.py in root, in combination with a binder directory.)

Another test with jupyter_notebook_config.py in root and a binder directory is here. (Oddly, adding vpython as a pip installation breaks the fix; I don't understand this incompatibility, but I'm certain after quite a bit of testing it is an issue.)


I've implemented the same fix at these two, that don't involve a binder directory and I'm leaving them here as other examples of the fix:

Wayne
  • 6,607
  • 8
  • 36
  • 93
  • Hmmm...no appmode is working today, like a couple a week after. – Wayne Mar 10 '23 at 21:16
  • Things will be fixed so appmode works via MyBinder launches again, see [here](https://discourse.jupyter.org/t/mybinder-org-and-repo2docker-updates/18333/3?u=fomightez) and [here](https://github.com/oschuett/appmode/issues/64#issuecomment-1474123163) for current state. – Wayne Mar 17 '23 at 16:53