Os: Windows 10 python: 3.8
Hello, I know there are several versions of the same error here (does not match the criteria), here (not answered), here (irrelevant and not answered) and is actually registered as python bug here but I can't find a solution that solves the problem. This code runs perfectly fine on my macbook pro and most probably will run without problems on linux, however I don't have a windows pc to test it and I need to, so when I run it through a friend's pc(which I do not have physical access to and I'm unable to debug the code myself) the code executes and does all the tasks it's expected to do, however by the time the code is exiting(after everything executes successfully in the browser), the error occurs therefore, I will not include the whole code, just the main()
& __main__
guard.
def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument(
'--base_url',
help='start url',
default='https://opensource-demo.orangehrmlive.com',
)
parser.add_argument('--username', help='login username', default='Admin')
parser.add_argument('--password', help='login password', default='admin123')
parser.add_argument('--name', help='employee name field', required=True)
parser.add_argument('--leave_type', help='leave type field', required=True)
parser.add_argument('--from_date', help='from date field', required=True)
parser.add_argument('--to_date', help='to date field', required=True)
parser.add_argument('--partial_days', help='partial days field', default='None')
parser.add_argument(
'--comment', help='assign leave comment', default='- Not required -'
)
parser.add_argument('--logout', help='logout after ', type=int, default=1)
cli_args = parser.parse_args(argv)
logger = get_logger()
driver = login(cli_args.base_url, logger, cli_args.username, cli_args.password)
submit_leave_form(
driver,
logger,
cli_args.name,
cli_args.leave_type,
cli_args.from_date,
cli_args.to_date,
cli_args.partial_days,
cli_args.comment,
cli_args.logout,
)
if __name__ == '__main__':
main(sys.argv[1:])
Error:
DevTools listening on ws://127.0.0.1:57815/devtools/browser/66dd41c3-c3c9-455e-9a84-4347b146e562
2020-09-30 18:19:39,395 API Extractor: WARNING Overlapping dates for Jasmine Morgan
2020-10-19 | 2020-10-20 | 2020-10-21 | 2020-10-22 | 2020-10-23
Exception ignored in: <function Popen.__del__ at 0x03727F58>
Traceback (most recent call last):
File "C:\Users\Ghandour\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 945, in _del_
self._internal_poll(_deadstate=_maxsize)
File "C:\Users\Ghandour\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1344, in _internal_poll
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] The handle is invalid