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
- Jupyter specifies that the port is open; Importerror: DLL load failed error
- Error: Can’t initialize nvrm channel [How to Solve]
- How to Solve jupyter notebook service error
- Uncaught SyntaxError: Cannot use import statement outside a module
- [Solved] Error executing Jupyter command ‘notebook‘: [Errno 2] No such file or directory
- How to Solve Chrome Error: “ERR_HTTP2_PROTOCOL_ERROR”
- [Solved] unknown error: DevToolsActivePort file doesn‘t exis
- How to Solve Jquery 1.9 $.browser Error
- [Solved] Console error: syntax error: illegal return statement
- 401 error after SAP Spartacus access token expires
- [Solved] bee must have one register DataBase alias named `default`
- Unknown custom element: [xxx] – did you register the component correctly…
- Solve the data transfer between vue irrelevant components error: this.$store.commit is not a function
- [Solved] Chrome Error: The request client is not a secure context
- [Solved] Eureka registry service starts error: Request execution error. Endpoint = defaultendpoint
- [Solved] Failed to load property source from location ‘classpath:/application.yml‘
- [Solved] webrtc Compile Error: ERROR: The installation of the Chrome OS default fonts failed.
- error MSB8011: Failed to register output [How to Solve]
- How to Solve Chrome Error: net::ERR_FAILED