Seite 1 von 1

Fehlercode PhantomJS

Verfasst: Mittwoch 28. Juni 2017, 13:34
von phoenixx592
kennt sich wer mit dem Fehlercode von PhantomeJS aus ? Unter Firefox funktioniert das Skript:

from selenium import webdriver
from selenium.webdriver.support.ui import Select

Code: Alles auswählen

driver = webdriver.PhantomJS("C:/Python27/phantomjs-2.1.1-windows/bin/phantomjs.exe")
driver.get('http://www.proxy-listen.de/Proxy/Proxyliste.html')
select = Select(driver.find_element_by_name('filter_response_time_http'))
select.select_by_value("3")
select = Select(driver.find_element_by_name('filter_http_anon'))
select.select_by_value("1")
select = Select(driver.find_element_by_name('filter_timeouts1'))
select.select_by_value("0")
driver.find_element_by_id('leech').click()
driver.find_element_by_name('submit').click()
text = driver.find_element_by_css_selector(".proxyListOdd").text

Fehlercode

Traceback (most recent call last):
File "C:/Users/Admin/PycharmProjects/Maker/Proxychoose2.py", line 5, in <module>
driver = webdriver.PhantomJS("C:/Python27/phantomjs-2.1.1-windows/bin/phantomjs.exe")
File "C:\Python27\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 51, in __init__
log_path=service_log_path)
File "C:\Python27\lib\site-packages\selenium\webdriver\phantomjs\service.py", line 45, in __init__
self._cookie_temp_file_handle, self._cookie_temp_file = tempfile.mkstemp()
File "C:\Python27\lib\tempfile.py", line 314, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File "C:\Python27\lib\tempfile.py", line 245, in _mkstemp_inner
_set_cloexec(fd)
File "C:\Python27\lib\tempfile.py", line 50, in _set_cloexec
flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
AttributeError: 'module' object has no attribute 'F_GETFD'

Re: Fehlercode PhantomJS

Verfasst: Mittwoch 28. Juni 2017, 14:12
von BlackJack
@phoenixx592: Du hast aus irgendwelchen Gründen unter Windows ein `fcntl`-Modul das es dort nicht geben dürfte.

Re: Fehlercode PhantomJS

Verfasst: Mittwoch 28. Juni 2017, 14:16
von phoenixx592
und wie bekomme ich das weg ? :K

Re: Fehlercode PhantomJS

Verfasst: Mittwoch 28. Juni 2017, 14:43
von BlackJack
@phoenixx592: Wie hast Du es denn her bekommen?

Re: Fehlercode PhantomJS

Verfasst: Mittwoch 28. Juni 2017, 17:58
von phoenixx592
Hab Python nochmal deinstalliert und alle Runtergeschmissen jetzt ist der Fehlercode weg und alles Funktioniert einwandfrei! :D