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

Restoring default theme #86

Closed
ghost opened this issue Dec 29, 2016 · 18 comments
Closed

Restoring default theme #86

ghost opened this issue Dec 29, 2016 · 18 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2016

I have no issues switching between themes, but restoring the default gives me trouble:

> jt -r
Reset css and font defaults in:
/Users/meowklaski/.jupyter/custom &
/Users/meowklaski/Library/Jupyter/nbextensions

There is nothing to be found in these directories...

@theotheo
Copy link

theotheo commented Jan 2, 2017

jt -r doesn't restore for me too.

@kindofluke
Copy link

I too had this problem and spent way too long debugging it but the following steps worked for me. Especially explicitly resetting the browser cache.

  1. make sure your notebook server isn't running.
  2. run jt -r
  3. delete the two directories listed by jt -r
  4. restart your notebook server
  5. (if still not reset) Force your browser to reset its cache. In chrome, you can do this with the devtools open F12. I don't think the Jupyter mini server can track changes to all the dependent files.
  6. if your still having a problems run curl 'http://localhost:8888/custom/custom.css' from the command line and manually inspect the css file being returned if it has CSS in it after all these steps you can continue to follow the debugs but at this point you should be all good.
  7. restart your jupyter notebook in debug mode Jupiter notebook --debug
  8. at the start of the debug it tried to load configuration from a number of directories depending on you install and package structure. The custom/custom.css should be in one of those directories. Find it and delete it.

hope that helps.

@ghost
Copy link
Author

ghost commented Jan 6, 2017

Ugh. What a pain. Thank you for the guidance!

I don't think that this used to be a problem. I wonder what happened.

@recluze
Copy link

recluze commented Jan 7, 2017

For me, it was just jt -r and then a browser cache clean.

@hichana
Copy link

hichana commented Jan 22, 2017

@kindofluke thank you! That worked for me!

@dunovank
Copy link
Owner

Hey all, thanks for your patience. I've attempted a fix in the new version (v0.14.0). Would anyone mind testing that out, reporting back here? I've also added a comment in the README examples saying that the browser cache must be reset after running jt -r in order to restore the default theme. Hopefully that fixes it.

@dunovank
Copy link
Owner

A little context for anyone interested...

The reason this has become an issue is that jupyter appears to cache the custom.css file in some odd locations so deleting the custom.css from ~/.jupyter/custom/ doesn't work (at least on most systems). However, juypyter does seem to restore the default css when ~/.jupyter/custom/custom.css exists as an empty file (which is the change implemented in the new version). Works for me (as long as I reset my browser cache) so fingers crossed.

Also, if anyone has any insight into a better way to do this I'm all ears.

Thanks again!

@dunovank
Copy link
Owner

dunovank commented Apr 6, 2017

Closing as issues appears to be fixed.

@Gustacro
Copy link

Gustacro commented Jun 7, 2019

followed the steps and delete my history with the cache in my browser (firefox) and went back to normal uffff, thank you

@RyanDjango
Copy link

how to solve this problem,my content is partially obscured after changing my theme
jupyter

@AurioPinto
Copy link

I think the following link is really helpful: https://github.com/dunovank/jupyter-themes

@MohammadHeydari
Copy link

jt -r works fine

@yashdattsawant
Copy link

install pip install jupyterthemes
make sure you have upgrageded jupyter-core pip install jupyter-core --upgrade
open jupyter use command ! jt -t monokai -f fira -fs 13 -nf ptsans -nfs 11 -N -kl -cursw 5 -cursc r -cellw 95% -T here "!" worked for me.
use sudo if needed

@chaitanyajadhav21
Copy link

install pip install jupyterthemes
make sure you have upgrageded jupyter-core pip install jupyter-core --upgrade
open jupyter use command ! jt -t monokai -f fira -fs 13 -nf ptsans -nfs 11 -N -kl -cursw 5 -cursc r -cellw 95% -T here "!" worked for me.
use sudo if needed

This worked for me as well

@mhatreapurva
Copy link

Hey all, thanks for your patience. I've attempted a fix in the new version (v0.14.0). Would anyone mind testing that out, reporting back here? I've also added a comment in the README examples saying that the browser cache must be reset after running jt -r in order to restore the default theme. Hopefully that fixes it.

jt -r works perfectly fine. Thanks.

@Jogi-official
Copy link

@yashdattsawant thanks man it really helps me a lot !!!!

@Caffeineandhustle
Copy link

Run !jt -r command in your jupyter notebook. Once successfully completed, close the notebook, restart Anaconda.

@prasanjithpatel
Copy link

thankssss mannnn!!!!!!

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