Jupiter notebook sets the default browser to open with an error
syntax error: (Unicode error) ‘UTF-8’ codec can’t decode byte 0xd4 in position 0: invalid continuation byte
The default code of the Notepad provided by the win system is ANSI. Just reopen the PY script in the notebook,
save it as a py script coded as UTF-8, and it’s OK to run the PY script.
Modify the name of the file: jupyter_notebook_config.py
Code reference
import webbrowser
webbrowser.register( "Cent Browser", None, webbrowser.GenericBrowser(r"C:\Users\中文用户名\AppData\Local\CentBrowser\Application\chrome.exe"))
c.NotebookApp.browser = "Cent Browser"
Set default browser, CMD input
jupyter notebook --generate-config
Find the PY file of the default configuration file
open it with notepad and find this statement: # c.NotebookApp.browser =
at the bottom of this statement, enter the following statement: the following figure is the configuration of chrome, * * pay attention to double \\**
# c.NotebookApp.password = '' Here
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'))
c.NotebookApp.browser = 'chrome'
Read More:
- [Solved] Jupyter Notebook Error: IOPub data rate exceeded
- How to Solve jupyter notebook service error
- [Solved] Error executing Jupyter command ‘notebook‘: [Errno 2] No such file or directory
- [Solved] when using jupyter notebook, “terminated worker error” appears
- [Solved] npm Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
- How to Solve Angular Error: error NG8002: Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.
- Sqoop Error: Can‘t parse input data: ‘\N‘ [How to Solve]
- [Solved] redis Error: Can‘t save in background fork Cannot allocate memory
- Jupyter specifies that the port is open; Importerror: DLL load failed error
- [Solved] Yolox Run Error: can‘t find starting number
- [Solved] Error: Can‘t locate revision identified by ‘xxx‘
- [Solved] Error dropping database (can‘t rmdir “emos“ errno: 39)
- [Solved] MYSQLD: Can‘t create directory ‘/usr/local/mysql/data/’(Errcode:2 -No such file or directory)
- [Webpack Update] vue-loader Error: Compiled with problems : ERRORModule notfound: Error:Can‘ t resolve vue in
- Module not found: Error: Can‘t resolve ‘sass-loader‘
- [Solved] spark sql Error: Can‘t zip RDDs with unequal numbers of partitions
- Module not found: Error: Can‘t resolve ‘sass-loader‘ in…
- [Solved] unknown error: DevToolsActivePort file doesn‘t exis
- Uncaught SyntaxError: Cannot use import statement outside a module