dunovank/jupyter-themes

Restoring default theme

Opened this issue ยท 18 comments

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...

jt -r doesn't restore for me too.

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.

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

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

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

@kindofluke thank you! That worked for me!

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.

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!

Closing as issues appears to be fixed.

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

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

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

jt -r works fine

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

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

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.

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

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

thankssss mannnn!!!!!!