Python Forum
Invalid argument error thrown.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid argument error thrown.
#1
Hello,

While running the following code an error thrown with "invalid argument". Appreciate your thoughts.

with open(dataFile, 'r') as urlFile:
    urlFile.readline()
    for url in urlFile:
        driver = webdriver.Chrome('C:\\chromedriver_win32\\chromedriver.exe')
        driver.get('url', )
        link = driver.find_element_by_xpath("/html/body")
        link.click()
    urlFile.close()
Error is as below :

Traceback (most recent call last):
File "C:/Users/spullabhotla/PycharmProjects/AutomateBoringStuff/Chapter-16-SendingEmail&TextMessages/fetchingEmailMessages.py", line 32, in <module>
driver.get('url', )
File "C:\Users\spullabhotla\Documents\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "C:\Users\spullabhotla\Documents\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\spullabhotla\Documents\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument
(Session info: chrome=76.0.3809.132)
Reply


Messages In This Thread
Invalid argument error thrown. - by pyseeker - Sep-09-2019, 09:44 PM
RE: Invalid argument error thrown. - by luoheng - Sep-10-2019, 03:26 AM
RE: Invalid argument error thrown. - by pyseeker - Sep-10-2019, 04:55 AM
RE: Invalid argument error thrown. - by Malt - Sep-10-2019, 05:26 AM
RE: Invalid argument error thrown. - by pyseeker - Sep-10-2019, 07:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange argument count error rowan_bradley 3 811 Aug-06-2023, 10:58 AM
Last Post: rowan_bradley
  error: invalid command 'egg_info' TimTu 0 1,021 Jul-27-2023, 07:30 AM
Last Post: TimTu
  Invalid argument: 'images\x08ackground.jpg' CatBall 4 1,063 Jun-19-2023, 09:28 AM
Last Post: CatBall
  which exception should be thrown for a sequence of the wrong length? Skaperen 1 901 Jan-06-2023, 04:13 AM
Last Post: deanhystad
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 11,511 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  Invalid format specifier Error Led_Zeppelin 2 8,111 Jul-11-2022, 03:55 PM
Last Post: Led_Zeppelin
  Error: _vhstack_dispatcher() takes 1 positional argument but 9 were given alexfrol86 3 5,991 May-09-2022, 12:49 PM
Last Post: deanhystad
Exclamation Invalid syntax error(Predict Ethereum Price) lulu43366 2 3,237 Sep-24-2021, 01:24 PM
Last Post: lulu43366
  Unexplained Invalid syntax Error cybertooth 5 3,380 Aug-02-2021, 10:05 AM
Last Post: cybertooth
  [split] [Errno 22] Invalid argument Junaid 0 2,333 Jun-12-2021, 06:02 PM
Last Post: Junaid

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020