Python Windowserror Error 87 The Parameter Is Incorrect
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Windows Error 87 The Parameter Is Incorrect
and policies of this site About Us Learn more about Stack oserror winerror 87 the parameter is incorrect Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up selenium causes windows error up vote 2 down vote favorite 1 I'm very new to selenium and I'm using its python package. So when I copied and ran the code found on its documentation page:http://selenium.googlecode.com/svn/trunk/docs/api/py/index.html, I got the following error: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys browser = webdriver.Firefox() Traceback (most recent call last): File "", line 1, in browser = webdriver.Firefox() File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 61, in __init__ self.binary, timeout), File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__ self.binary.launch_browser(self.profile) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 50, in launch_browser self._start_from_profile_path(self.profile.path) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 73, in _start_from_profile_path env=self._firefox_env).communicate() File "C:\Python27\lib\subprocess.py", line 679, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 893, in _execute_child startupinfo) WindowsError: [Error 87] The parameter is incorrect I followed this other documentation:http://selenium-python.readthedocs.org/en/latest/installation.html#downloading-python-bindings-for-selenium to install selenium. At first when I ran virtualenv.py file the output would say setuptools*.tar.gz, pip.*.tar.gz not found, so I downloaded those two tar files and put them in seltests folder and then the terminal didn't complain anymore. So the installation should be successful. Any help is appreciated! I'm using windows 7, 64 bit. python windows selenium share|improve this question edited Aug 3 '13 at 22:56 asked Aug 3 '13 at 19:31 GorillaInR 320213 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote I ran into this this morning and the problem was that selenium couldn't find the path
User List Committer List Help Tracker Documentation Tracker Development Report Tracker Problem Issue1311 classification Title: os.path.exists(os.devnull) regression on windows Type: Stage: Components: Library (Lib) Versions: Python 2.5 process Status: closed Resolution: not a bug Dependencies: Superseder: Assigned To: Nosy List: d_kagedal, facundobatista, ggenellina, kdwyer, loewis Priority: normal Keywords: Created on 2007-10-22 12:04 by d_kagedal, last changed 2008-02-23 21:19 by akuchling. This issue is now closed. Messages (11) msg56644 - (view) Author: David Kågedal (d_kagedal) Date: 2007-10-22 12:04 When moving from Python 2.4 to http://stackoverflow.com/questions/18036487/selenium-causes-windows-error Python 2.5, my program stopped working on win32 because of a change in os.path.exists. I couldn't find any description of the change, so I can only assume it's a bug. The os.devnul variable contains the name of the "null file", which is "/dev/null" on posix, and "nul" on win32. As I understand it, "NUL" is a file that https://bugs.python.org/issue1311 exists in every directory on win32. Opening the "nul" file with open("nul", "r") works fine, but os.path.exists("nul") returns False. In Python 2.4, it returns True. msg56645 - (view) Author: David Kågedal (d_kagedal) Date: 2007-10-22 12:23 It's called os.devnull, and nothing else. msg56652 - (view) Author: Facundo Batista (facundobatista) * Date: 2007-10-22 17:13 You migrated only of Python version, or also of windows installation? I checked Py25 and Py23 in my Win 2k, and in both I have the same behaviour: C:\Python23>python Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.stat("nul") Traceback (most recent call last): File "", line 1, in ? OSError: [Errno 22] Invalid argument: 'nul' >>> os.path.exists("nul") False >>> I checked the os.stat() function because the documentation says that if it gives an error, exists() will return False (and that this is how it's implemented). BTW, note that if you call to the GetFileAttributesEx() function of kernel32.dll by yourself,
GoogleВойтиСкрытые поляПоиск групп или сообщений
new to selenium and have been trying to learn its python package by running scripts found on its documentation website: http://selenium.googlecode.com/svn/trunk/docs/api/py/index.html. But I got the following error as soon as I try to set up a firefox browser object:from selenium import webdriverfrom selenium.common.exceptions import NoSuchElementExceptionfrom selenium.webdriver.common.keys import Keysbrowser = webdriver.Firefox()Traceback (most recent call last): File "", line 1, in browser = webdriver.Firefox() File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 61, in __init__ self.binary, timeout), File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__ self.binary.launch_browser(self.profile) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 50, in launch_browser self._start_from_profile_path(self.profile.path) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 73, in _start_from_profile_path env=self._firefox_env).communicate() File "C:\Python27\lib\subprocess.py", line 679, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 893, in _execute_child startupinfo)WindowsError: [Error 87] The parameter is incorrectI ran into this this morning and the problem was that selenium couldn't find the path to firefox.exe.Try adding it to your system PATH.Or you can hardcode the path in your test script. Seehttp://stackoverflow.com/questions/17580730/python-selenium-error-when-trying-to-launch-firefoxHope that helps,Kieran -- 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 selenium-users+unsubscribe@xxxxxxxxxxxxxxxxx To post to this group, send email to selenium-users@xxxxxxxxxxxxxxxxx To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/bfe16556-847a-4b61-9e29-2839ddfc8d4c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. Thread at a glance: Previous Message by Date: [selenium-