You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
What steps will reproduce the problem?
1. Do the following in python 2.7.6
from selenium import webdriver
import gc
while True:
d=webdriver.PhantomJS('phantomjs')
d.quit()
d=None
gc.collect()
2. ls /proc/[Python process id]/fd
0 10 12 14 16 18 2 21 23 25 27 29 30 32 34 36 38 40 42 44 46
48 5 51 53 6 8
1 11 13 15 17 19 20 22 24 26 28 3 31 33 35 37 39 41 43 45 47
49 50 52 54 7 9
3. There're a lot of leaking file descriptors!
What is the expected output? What do you see instead?
There should not be any file descriptor leak.
Selenium version: 2.41.0 (installed using "pip install")
OS: Ubuntu Desktop 14.04 LTS on x86_64
Browser: PhantomJS
Browser version: 1.9.0 (from ubuntu repository)
Python Version: 2.7.6
Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!
Reported by kcm1700 on 2014-05-05 14:27:14
The text was updated successfully, but these errors were encountered:
After doing some git bisect, I found that the issue is introduced in "[8fc478b09ea3c76800d09ab6681f9c3895b1bbc4]
python switch_to_ deprecation / adding switch_to class like the other language bindings"
Ok, the situation is similar to this one.
http://ideone.com/u2rD92
A -> switch_to
B -> webdriver (in phantomjs module. it defined __del__)
C -> Popen object (it has __del__ by default)
There is a problem with calling "stop()" from Service's "__del__()" method. From time
to time, we are getting:
> Exception AttributeError: "'Service' object has no attribute 'process'" in <bound
method Service.__del__ of <selenium.webdriver.phantomjs.service.Service object at 0x7fbb28dc17d0>>
ignored
this happens in the "stop()" method where the service instance is not available anymore
(is None).
See more at relevant stackoverflow post: http://stackoverflow.com/questions/27674088/scrapy-with-selenium-webdriver-failing-to-instantiate.
Originally reported on Google Code with ID 7304
Reported by
kcm1700
on 2014-05-05 14:27:14The text was updated successfully, but these errors were encountered: