Sorry that the handler shall be code_runner.py, not ast.py.
Traceback (most recent call last):
File “C:\users\itri2021\appdata\local\programs\python\python37\lib\site-packages\bokeh\application\handlers\code_runner.py”, line 106, in init
nodes = ast.parse(source, os.fspath(path))
File “C:\users\itri2021\appdata\local\programs\python\python37\lib\ast.py”, line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File “D:\project\BokehTest\myapp.py”, line 1
SyntaxError: invalid character in identifier
Hi @Chen_Jack please note that for code formatting, it is backtick characters ``` not single quotes.
I cannot reproduce any problem with the code on that page, it runs as expected with Bokeh 2.4.2. You will need to provide more details about your system and exactly what you are doing. But as a first step I would actually suggest that you clone the main repo and try to run some of the examples from the examples directory there directly:
Perhaps there is some editor or copy past issue with hidden characters that is causing an issue for you on your local system. All the examples in the repo are test to work continuously in our automated CI system.
Hi @Bryan , The file created by notepad is working and the file created by Visual Studo Code wasn’t. My Visual Studio Code version is 1.67.0. Still cannot find hidden characters but that should be the problem. Many thanks!