【发布时间】:2021-11-03 04:31:05
【问题描述】:
此代码在 windows 上运行良好,但在 mac 上却出现此错误。
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/Users/shh/Desktop/gen/app.py", line 467, in worker
account(item, password)
File "/Users/shh/Desktop/gen/app.py", line 159, in account
browser = webdriver.Chrome(service=service, options=chrome_options)
TypeError: __init__() got an unexpected keyword argument 'service'
【问题讨论】: