Running bokeh as a background process from python

I’m trying to start the bokeh server from python using subprocess. Problem is that when I try and execute the command from python

pid = subprocess.Popen(["bokeh","serve","--allow-websocket-origin","10.180.6.63:5000","--show ","--port=5000","--address","10.180.6.63","core/scripts/plots/trend_chart_for_dashboard_42090557.py",
"--args","forTrendChart","\"25/06/2020 11:00 AM\"","\"26/06/2020 11:00 AM\""]).pid

it shows this error:

error: unrecognized arguments: core/scripts/plots/trend_chart_for_dashboard_42090557.py

trend_chart_for_dashboard_42090557.py is the plot file.

But when I try the same command

bokeh serve --allow-websocket-origin 10.180.6.63:5000 --show --port=5000 --address 10.180.6.63 core/scripts/plots/trend_chart_for_dashboard_42090557.py --args forTrendChart “25/06/2020 11:00 AM” “26/06/2020 11:00 AM”

in the terminal it runs perfectly fine.
How can I run the bokeh server in the background using python.

You appear to have a space after show in "–show " which will probably confuse the command line parser

@reddihari please use Discourses code formatting capability, and not the plain text quoting as you have above. Plain quoting can cause issues with “fancy” quote marks as seen above.

@samr85 Yes, It was the space that caused the error. Thank you.