请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

执行uc.Chrome()报错

执行到uc.Chrome()报错

github上面已经取消了undetected_chromedriver.v2的引用,请直接使用如下代码:

import undetected_chromedriver as uc
driver = uc.Chrome()
driver.get('https://nowsecure.nl')

图片描述

正在回答 回答被采纳积分+3

2回答

Jynine 2022-02-10 09:52:29

我改成你这个代码还是报错:

Traceback (most recent call last):

  File "F:\python\envs\article_spider\lib\site-packages\scrapy\core\engine.py", line 129, in _next_request

    request = next(slot.start_requests)

  File "F:\python\pythonworkspace\ArticleSpider\ArticleSpider\spiders\cnblogs.py", line 13, in start_requests

    driver = uc.Chrome()

  File "F:\python\envs\article_spider\lib\site-packages\undetected_chromedriver\__init__.py", line 357, in __init__

    options.binary_location, *options.arguments

  File "F:\python\envs\article_spider\lib\site-packages\undetected_chromedriver\dprocess.py", line 34, in start_detached

    daemon=True,

  File "c:\program files\python\lib\multiprocessing\process.py", line 112, in start

    self._popen = self._Popen(self)

  File "c:\program files\python\lib\multiprocessing\context.py", line 223, in _Popen

    return _default_context.get_context().Process._Popen(process_obj)

  File "c:\program files\python\lib\multiprocessing\context.py", line 322, in _Popen

    return Popen(process_obj)

  File "c:\program files\python\lib\multiprocessing\popen_spawn_win32.py", line 46, in __init__

    prep_data = spawn.get_preparation_data(process_obj._name)

  File "c:\program files\python\lib\multiprocessing\spawn.py", line 143, in get_preparation_data

    _check_not_importing_main()

  File "c:\program files\python\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main

    is not going to be frozen to produce an executable.''')


0 回复 有任何疑惑可以回复我~
  • bobby #1
    你留下qq 我加你看看吧
    回复 有任何疑惑可以回复我~ 2022-02-13 18:59:32
bobby 2022-02-06 21:45:16

你的报错信息是什么呢?

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信