Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
bot.get('https://twitter.com/login?prefetchTimestamp=1578359330579')
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Joe Ward
Have you specified where the program can find Geckodriver? You're not doing it in the above code but it has to happen somewhere, e.g. your path. The error you're receiving suggests it's not even starting. 

On Tue, 7 Jan 2020 at 09:28, Ryan Farrell <[hidden email]> wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0J2WKoub6tN4MiTXuNtXArUm9c6xJzPTbcMfTqVh_P3w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
How do I specify the path?

On Wed, Jan 8, 2020 at 1:46 AM Joe Ward <[hidden email]> wrote:
Have you specified where the program can find Geckodriver? You're not doing it in the above code but it has to happen somewhere, e.g. your path. The error you're receiving suggests it's not even starting. 

On Tue, 7 Jan 2020 at 09:28, Ryan Farrell <[hidden email]> wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0J2WKoub6tN4MiTXuNtXArUm9c6xJzPTbcMfTqVh_P3w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OOhMzAzYx7_Q6doHP6W6nU3RmCaXrFo%2B9MYsTXfOSD6Yg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Joe Ward
For reference, this result was the first result on Google when I typed “python driver path”.

On Wed, 8 Jan 2020 at 04:56, Ryan Farrell <[hidden email]> wrote:
How do I specify the path?

On Wed, Jan 8, 2020 at 1:46 AM Joe Ward <[hidden email]> wrote:
Have you specified where the program can find Geckodriver? You're not doing it in the above code but it has to happen somewhere, e.g. your path. The error you're receiving suggests it's not even starting. 

On Tue, 7 Jan 2020 at 09:28, Ryan Farrell <[hidden email]> wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0J2WKoub6tN4MiTXuNtXArUm9c6xJzPTbcMfTqVh_P3w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OOhMzAzYx7_Q6doHP6W6nU3RmCaXrFo%2B9MYsTXfOSD6Yg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0F5ON_m2v-7SQZHB7DRnTbC0y%2BzN1zBek%2BhwD7N6q5gw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
Ok, I found that page as well, but it just doesn't work for me unfortunately. Geckodriver is in the same file as python, which is in /usr/bin/ yet when I specify the path as demonstrated on the link you sent, it tells me that apparently there is no file or directory. Because apparently the usr directory doesn't exist, but it does, and I don't know what to do. I tried this
image.png
and I got this message 
image.png
It is also irrelevant whether or not I add the '/' at the start of the path, it still doesn't change the message.

On Wed, Jan 8, 2020 at 7:58 PM Joe Ward <[hidden email]> wrote:
For reference, this result was the first result on Google when I typed “python driver path”.

On Wed, 8 Jan 2020 at 04:56, Ryan Farrell <[hidden email]> wrote:
How do I specify the path?

On Wed, Jan 8, 2020 at 1:46 AM Joe Ward <[hidden email]> wrote:
Have you specified where the program can find Geckodriver? You're not doing it in the above code but it has to happen somewhere, e.g. your path. The error you're receiving suggests it's not even starting. 

On Tue, 7 Jan 2020 at 09:28, Ryan Farrell <[hidden email]> wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0J2WKoub6tN4MiTXuNtXArUm9c6xJzPTbcMfTqVh_P3w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OOhMzAzYx7_Q6doHP6W6nU3RmCaXrFo%2B9MYsTXfOSD6Yg%40mail.gmail.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0F5ON_m2v-7SQZHB7DRnTbC0y%2BzN1zBek%2BhwD7N6q5gw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_ON2CqfhQaO2kj_Fz-%3D8R4eh5CQ2%2BG1y6i%2BMkzNpQ24uNA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
So, I managed to do a bit more searching and figured out I needed "executable_path=" before my path, however, I did that and now the same problem as I had originally is back. This message:
image.png

On Wed, Jan 8, 2020 at 8:57 PM Ryan Farrell <[hidden email]> wrote:
Ok, I found that page as well, but it just doesn't work for me unfortunately. Geckodriver is in the same file as python, which is in /usr/bin/ yet when I specify the path as demonstrated on the link you sent, it tells me that apparently there is no file or directory. Because apparently the usr directory doesn't exist, but it does, and I don't know what to do. I tried this
image.png
and I got this message 
image.png
It is also irrelevant whether or not I add the '/' at the start of the path, it still doesn't change the message.

On Wed, Jan 8, 2020 at 7:58 PM Joe Ward <[hidden email]> wrote:
For reference, this result was the first result on Google when I typed “python driver path”.

On Wed, 8 Jan 2020 at 04:56, Ryan Farrell <[hidden email]> wrote:
How do I specify the path?

On Wed, Jan 8, 2020 at 1:46 AM Joe Ward <[hidden email]> wrote:
Have you specified where the program can find Geckodriver? You're not doing it in the above code but it has to happen somewhere, e.g. your path. The error you're receiving suggests it's not even starting. 

On Tue, 7 Jan 2020 at 09:28, Ryan Farrell <[hidden email]> wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/72e542fa-cc42-48cd-8e60-296f37eedc72%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0J2WKoub6tN4MiTXuNtXArUm9c6xJzPTbcMfTqVh_P3w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OOhMzAzYx7_Q6doHP6W6nU3RmCaXrFo%2B9MYsTXfOSD6Yg%40mail.gmail.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs0F5ON_m2v-7SQZHB7DRnTbC0y%2BzN1zBek%2BhwD7N6q5gw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_ONsk4m_rS9d53QBUja-UWqMYMnGAstnW4aKib1haiXA2g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

ReGenesis CHC
Have you found any solution?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
lol, its literally been 4 months. yeah, I found one eventually

On Mon, May 4, 2020 at 1:52 AM ReGenesis CHC <[hidden email]> wrote:
Have you found any solution?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OOc_y3DvMkZ82Q%2Bm25-47w0Piq4cEjEfB1iaR3Zy47Rdw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Huy Dang
Hi Ryan, may I ask how you resolve the issue? I have the same error and it has been driving me crazy for the last 2 days. Thank you in advance!

On Monday, May 4, 2020 at 11:42:06 AM UTC+2, Ryan Farrell wrote:
lol, its literally been 4 months. yeah, I found one eventually

On Mon, May 4, 2020 at 1:52 AM ReGenesis CHC <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dZBCdCeDAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mahan...@...> wrote:
Have you found any solution?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="dZBCdCeDAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3dbbfd80-d6ed-452f-b71e-9ad6ab6c51fb%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Rishi Dhanaraj
In reply to this post by Ryan Farrell
Hi Ryan, I'm also curious—unfortunately clocked over 40 hours figuring out this and some other errors when deploying my application. Let us know if you can, thank you tons!

On Tuesday, January 7, 2020 at 1:28:50 AM UTC-8, Ryan Farrell wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
bot.get('<a href="https://twitter.com/login?prefetchTimestamp=1578359330579" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2Flogin%3FprefetchTimestamp%3D1578359330579\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGSK7-ntQt7Z6uoKpIuptPpxg7OpA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2Flogin%3FprefetchTimestamp%3D1578359330579\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGSK7-ntQt7Z6uoKpIuptPpxg7OpA&#39;;return true;">https://twitter.com/login?prefetchTimestamp=1578359330579')
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('<a href="javascript:" target="_blank" gdf-obfuscated-mailto="SRgNWjZLBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ryan007...@gmail.com', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f2ad6971-96e8-4832-872a-d80acf942ea2o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Ryan Farrell
It was a long time ago, but are you using the terminal on vscode or are you using the one on the computer itself, because I'm pretty sure once instated using the one on the computer rather than the program it worked for some reason. 

On Wed, 24 Jun 2020, 22:11 Rishi Dhanaraj, <[hidden email]> wrote:
Hi Ryan, I'm also curious—unfortunately clocked over 40 hours figuring out this and some other errors when deploying my application. Let us know if you can, thank you tons!

On Tuesday, January 7, 2020 at 1:28:50 AM UTC-8, Ryan Farrell wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('[hidden email]', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ibIWEdLvpK4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f2ad6971-96e8-4832-872a-d80acf942ea2o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAF39_OP7mAG7aOuM%2BSMR1fNy2FpqokEnYYA2kAUr3s60ZU2k1g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Athithya raj
In reply to this post by ReGenesis CHC
Are you using Linux cron tab to run? And got those exception

On Sun 3 May, 2020, 7:22 PM ReGenesis CHC, <[hidden email]> wrote:
Have you found any solution?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/de2343fd-45af-4d37-b69e-7f270d1bd417%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAOwTKkN9h4qdTFJHg4yhr2yDBDvWzWUVtHiRztsrx8MAj8QZxQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error when using Selenium and Firefox - "invalid argument: can't kill an exited process"

Jim March
In reply to this post by Rishi Dhanaraj
After a week of struggling with the same error, I found that I needed the following line typed at the command line ($) of the environment I was using:

export DISPLAY=":0"

In my case, this allowed Visual Studio Code 1.46.1 to open an output screen on my console when running Python 3.6.9 with Selenium 3.141.0 and Pytest 5.4.3 modules. Will it work for you? Don't know. It was such a simple thing that worked. Not sure why. Something to do with session display output routing? NOTE: When I want to run the Python program using the Selenium webdriver WITHOUT the session display output coming to my console, I can run the webdriver "headless".

Hope this helps more than hinders...

On Wednesday, 24 June 2020 06:11:31 UTC-4, Rishi Dhanaraj wrote:
Hi Ryan, I'm also curious—unfortunately clocked over 40 hours figuring out this and some other errors when deploying my application. Let us know if you can, thank you tons!

On Tuesday, January 7, 2020 at 1:28:50 AM UTC-8, Ryan Farrell wrote:
I am making a twitter bot using geckodriver, selenium and python. I have installed the latest version of all of these but I am receiving this error when I execute the program:


Screenshot from 2020-01-07 18-45-00.png

Nothing i do solves the problem. This is the code. I am running Ubuntu 19.04, and the webdriver is in the right place (usr/bin):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

class TwitterBot:
def __init__(self, email, password):
self.email = email
self.password = password
self.bot = webdriver.Firefox()

def login(self):
bot = self.bot
bot.get('<a href="https://twitter.com/login?prefetchTimestamp=1578359330579" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2Flogin%3FprefetchTimestamp%3D1578359330579\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGSK7-ntQt7Z6uoKpIuptPpxg7OpA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2Flogin%3FprefetchTimestamp%3D1578359330579\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGSK7-ntQt7Z6uoKpIuptPpxg7OpA&#39;;return true;">https://twitter.com/login?prefetchTimestamp=1578359330579')
time.sleep(10)
email = bot.find_element_by_name('session[username_or_email]')
password = bot.find_element_by_name('session[password]')
email.clear()
password.clear()
email.send_keys(self.email)
password.send_keys(self.password)
password.send_keys(Keys.RETURN)
time.sleep()

ryan = TwitterBot('ryan007...@gmail.com', 'testtest123')
ryan.login()

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/abc6cd85-9fe8-4fe2-9c25-86f33041fc7ao%40googlegroups.com.