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

Clearer instructions in automatically triggering appmode #13

Closed
JuanCab opened this issue Jun 2, 2018 · 8 comments
Closed

Clearer instructions in automatically triggering appmode #13

JuanCab opened this issue Jun 2, 2018 · 8 comments

Comments

@JuanCab
Copy link

JuanCab commented Jun 2, 2018

I am having a problem in that I want a Jupyter notebook in a subdirectory of my repo to launch in appmode in Binder and I can NOT seem to find a way to do it. Placing "%2Fapp%2F" before the path to the Jupyter notebook in the urlpath doesn't seem to work. Can you clearly state how to automatically trigger app mode in a doc?

@oschuett
Copy link
Owner

oschuett commented Jun 3, 2018

Placing "%2Fapp%2F" before the path to the Jupyter notebook in the urlpath doesn't seem to work.

Hmm, that's actually exactly how it should work. Can you post your link?

@JuanCab
Copy link
Author

JuanCab commented Jun 3, 2018

I tried testing my notebook at

https://mybinder.org/v2/gh/JuanCab/AstroInteractives/master?filepath=HRdiagram/Interactive_HR_Diagram.ipynb

using

https://mybinder.org/v2/gh/JuanCab/AstroInteractives/master?filepath=%2Fapp%2FHRdiagram/Interactive_HR_Diagram.ipynb

with no success. It results in a "404 : Not Found, You are requesting a page that does not exist!" error whereas the first link works fine.

@oschuett
Copy link
Owner

oschuett commented Jun 3, 2018

You need to fully url-escape the path. Try: https://mybinder.org/v2/gh/JuanCab/AstroInteractives/master?urlpath=%2Fapps%2FHRdiagram%2FInteractive_HR_Diagram.ipynb

Nice notebook btw, brings back some great memories :-)

@oschuett oschuett closed this as completed Jun 3, 2018
@JuanCab
Copy link
Author

JuanCab commented Jun 3, 2018

Oh nuts, of course! Thanks! Any chance you could add the ability to launch without editing on? Not sure yet whether I want to risk students (in an Introductory astronomy course) accidentally hitting “Edit” button.

@oschuett
Copy link
Owner

oschuett commented Jun 3, 2018

Yes, you can hide the edit button via the custom.js file. Basically, you have to add a file called .jupyter/custom/custom.js with content $('#appmode-leave').hide(); to your repository.

See also https://github.com/oschuett/appmode#customization .

@joshwapiano
Copy link

Hi @oschuett, I'm also having trouble using appmode in Binder! I'm using a test document here as an example - the non-appmode link works fine:
https://mybinder.org/v2/gh/joshwapiano/amrtool/master?filepath=pandas_df_testing_01.ipynb

However changing filepath to urlpath and adding %2Fapps%2F as follows leads to a '404 : Not Found' error.
https://mybinder.org/v2/gh/joshwapiano/amrtool/master?urlpath=%2Fapps%2Fpandas_df_testing_01.ipynb

I tried adding a binder/postBuild file to my repository as is in yours but that completely broke the first link! (I'm also not sure whether that is necessary or not)

could this be because I'm using python 3.7 instead of 3.6?

@djsegal
Copy link

djsegal commented Apr 2, 2019

@oschuett
Copy link
Owner

oschuett commented Apr 3, 2019

@djsegal your issue is most likely caused by the mixing of Conda and pip packages in your environment.yml. Maybe you can install Julia via Conda as well?

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

No branches or pull requests

4 participants