Reputation: 105
I hope you are ok. I'm trying to make a script open chrome for me and then click on a tap :
import os
import subprocess
import pyautogui
cmd = 'google-chrome'
if (subprocess.call(cmd)):
pyautogui.click(618, 671)
#use it to know your screen position you may need to install scrot
# pyautogui.displayMousePosition()
but when I run the script I get an error, the error said : [6869:6869:1111/121828.562003:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process. [6815:6848:1111/121828.628223:ERROR:media_history_store.cc(363)] Failed to create or update the media history store. Any ideas about how I can solve it.
Upvotes: 1
Views: 539
Reputation: 1359
subprocess.call(cmd)
is a blocking call and your program will not continue.
Use subprocess.Popen(cmd)
instead
Anyways to overcome that error, you should change your command to google-chrome --disable-gpu --disable-software-rasterizer
and don't run in sudo
:)
Upvotes: 1