Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro ao iniciar o script #4

Open
dezordi opened this issue Mar 31, 2020 · 14 comments
Open

Erro ao iniciar o script #4

dezordi opened this issue Mar 31, 2020 · 14 comments

Comments

@dezordi
Copy link

dezordi commented Mar 31, 2020

Ao rodar o comando:
$ python 3.6 script.py

abre uma janela em branco do firefox, e é retornada a seguinte mensagem:

Traceback (most recent call last):
File "script.py", line 14, in
firefox = webdriver.Firefox()
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession

@dezordi
Copy link
Author

dezordi commented Mar 31, 2020

$ conda list

packages in environment at /home/filipe/anaconda3/envs/BBBot:

Name Version Build Channel

_libgcc_mutex 0.1 main
ca-certificates 2020.1.1 0
certifi 2019.11.28 py38_1
ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20181209 hc058e9b_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
ncurses 6.2 he6710b0_0
numpy 1.18.2 pypi_0 pypi
opencv-python 4.2.0.32 pypi_0 pypi
openssl 1.1.1f h7b6447c_0
pip 20.0.2 py38_1
python 3.8.2 hcf32534_0
readline 8.0 h7b6447c_0
selenium 3.141.0 pypi_0 pypi
setuptools 46.1.3 py38_0
sqlite 3.31.1 h7b6447c_0
tk 8.6.8 hbc83047_0
urllib3 1.25.8 pypi_0 pypi
wheel 0.34.2 py38_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3

@linkgab
Copy link

linkgab commented Mar 31, 2020

Ao rodar o comando:
$ python 3.6 script.py

abre uma janela em branco do firefox, e é retornada a seguinte mensagem:

Traceback (most recent call last):
File "script.py", line 14, in
firefox = webdriver.Firefox()
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession

Você deve instalar o Selenium digitando "pip3 install selenium" (sem aspas) no CMD. Siga as instruções na página principal abaixo da seção "Começando os trabalhos".

@dezordi
Copy link
Author

dezordi commented Mar 31, 2020

Ao rodar o comando:
$ python 3.6 script.py
abre uma janela em branco do firefox, e é retornada a seguinte mensagem:

Traceback (most recent call last):
File "script.py", line 14, in
firefox = webdriver.Firefox()
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/filipe/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession

Você deve instalar o Selenium digitando "pip3 install selenium" (sem aspas) no CMD. Siga as instruções na página principal abaixo da seção "Começando os trabalhos".

Deu certo agora, era a versão do gecko antiga, tem que atualizar pra 0.26 pra rodar

@linkgab
Copy link

linkgab commented Mar 31, 2020

Boa!

@rammonfelip
Copy link

rammonfelip commented Mar 31, 2020

Não estou conseguindo rodar o script:
`Traceback (most recent call last):
File "script.py", line 24, in
browser = webdriver.Chrome(capabilities=caps)
TypeError: init() got an unexpected keyword argument 'capabilities'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "script.py", line 29, in
browser = webdriver.Firefox(capabilities=caps)
File "/home/feliperamon/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in init
self.service.start()
File "/home/feliperamon/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'geckodriver'
`

@gustav0peters
Copy link

O meu esta dando o mesmo erro, conseguiu resolver amigo ?

@MiniMarvin
Copy link
Collaborator

@gustav0peters a nova versão está funcionando corretamente, recomendo atualizar o bbbot para poder funcionar corretamente

@erickssa
Copy link

erickssa commented Apr 1, 2020

Não estou conseguindo rodar o script:
`Traceback (most recent call last):
File "script.py", line 24, in
browser = webdriver.Chrome(capabilities=caps)
TypeError: init() got an unexpected keyword argument 'capabilities'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "script.py", line 29, in
browser = webdriver.Firefox(capabilities=caps)
File "/home/feliperamon/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in init
self.service.start()
File "/home/feliperamon/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'geckodriver'

@gustav0peters
Copy link

o meu deu o mesmo erro @erickssa

@MiniMarvin
Copy link
Collaborator

pra esse erro precisa instalar a versão 25 do geckodriver https://github.com/mozilla/geckodriver/releases/tag/v0.25.0

@erickssa
Copy link

erickssa commented Apr 1, 2020

Traceback (most recent call last):
File "script.py", line 27, in
browser = webdriver.chrome(capabilities=caps)
TypeError: 'module' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "script.py", line 32, in
browser = webdriver.Firefox(capabilities=caps)
File "/home/erick/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in init
self.service.start()
File "/home/erick/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'geckodriver'

@murilogontijo
Copy link

Olá, podem me ajudar?

Depois que digito o Email, a Senha e o link, ocorre esse erro:

Traceback (most recent call last):
File "script.py", line 23, in
browser = webdriver.Chrome(capabilities=caps)
TypeError: init() got an unexpected keyword argument 'capabilities'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "script.py", line 28, in
browser = webdriver.Firefox(capabilities=caps)
File "/home/murilo/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/home/murilo/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/home/murilo/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/murilo/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/murilo/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process

@MiniMarvin
Copy link
Collaborator

@murilogontijo você poderia dizer se todas as dependências do selenium estão corretamente instaladas e a versão delas?

@Romilsonlonan
Copy link

Ja fiz de tudo sem sucesso!

/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response)
243 alert_text = value["alert"].get("text")
244 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here
--> 245 raise exception_class(message, screen, stacktrace)

WebDriverException: Message: unknown error: cannot find Chrome binary
Stacktrace:
#0 0x557ed2e40fe3
#1 0x557ed2b7fd36
#2 0x557ed2ba6f4a
#3 0x557ed2ba4a9b
#4 0x557ed2be6af7
#5 0x557ed2be611f
#6 0x557ed2bdd693
#7 0x557ed2bb003a
#8 0x557ed2bb117e
#9 0x557ed2e02dbd
#10 0x557ed2e06c6c
#11 0x557ed2e104b0
#12 0x557ed2e07d63
#13 0x557ed2ddac35
#14 0x557ed2e2b138
#15 0x557ed2e2b2c7
#16 0x557ed2e39093
#17 0x7fd60a536609 start_thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants