Git Product home page Git Product logo

Comments (9)

shelfee avatar shelfee commented on September 26, 2024

/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
warnings.warn(
2023-09-21 11:38:05.287734 开始解析配置文件
2023-09-21 11:38:05.288128 结束解析配置文件
2023-09-21 11:38:05.300655 开始设置浏览器参数
Traceback (most recent call last):
File "main.py", line 14, in
main()
File "main.py", line 8, in main
huawei = HuaWei("config.ini")
File "/Users/zhangxiaofei.sf/repos/hw_seckill/huawei.py", line 26, in init
self.__browser_setting()
File "/Users/zhangxiaofei.sf/repos/hw_seckill/huawei.py", line 112, in __browser_setting
browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init
super().init(
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in init
super().init(
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 205, in init
self.start_session(capabilities)
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
self.error_handler.check_response(response)
File "/Users/zhangxiaofei.sf/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory
Stacktrace:
0 chromedriver 0x000000010313ed58 chromedriver + 4336984
1 chromedriver 0x0000000103136dd4 chromedriver + 4304340
2 chromedriver 0x0000000102d63a5c chromedriver + 293468
3 chromedriver 0x0000000102d97fb4 chromedriver + 507828
4 chromedriver 0x0000000102d93668 chromedriver + 489064
5 chromedriver 0x0000000102d91798 chromedriver + 481176
6 chromedriver 0x0000000102dd3e24 chromedriver + 753188
7 chromedriver 0x0000000102d9ca5c chromedriver + 526940
8 chromedriver 0x0000000102d9d908 chromedriver + 530696
9 chromedriver 0x0000000103104da4 chromedriver + 4099492
10 chromedriver 0x0000000103109260 chromedriver + 4117088
11 chromedriver 0x000000010310f4ec chromedriver + 4142316
12 chromedriver 0x0000000103109d60 chromedriver + 4119904
13 chromedriver 0x00000001030e1a34 chromedriver + 3955252
14 chromedriver 0x0000000103126a08 chromedriver + 4237832
15 chromedriver 0x0000000103126b84 chromedriver + 4238212
16 chromedriver 0x0000000103136a4c chromedriver + 4303436
17 libsystem_pthread.dylib 0x00000001a1b0426c _pthread_start + 148
18 libsystem_pthread.dylib 0x00000001a1aff08c thread_start + 8

from hw_seckill.

muzi-admin avatar muzi-admin commented on September 26, 2024

关掉Chrome浏览器后,再次启动程序。
猜测应该是有后台打开的Chrome抢占。

from hw_seckill.

shelfee avatar shelfee commented on September 26, 2024

我把后台chrome相关所有进程退出后,还是不行,一个错误

from hw_seckill.

muzi-admin avatar muzi-admin commented on September 26, 2024

我把后台chrome相关所有进程退出后,还是不行,一个错误

哦,MAC环境我不太了解。猜测可能是Chrome和插件的版本问题。等作者来解答吧。

from hw_seckill.

ancoka avatar ancoka commented on September 26, 2024

看错误是无法创建profile directory,检查下userDataDir配置是否存在引号,存在请把引号去掉尝试一下

from hw_seckill.

shelfee avatar shelfee commented on September 26, 2024

不存在引号
image

from hw_seckill.

ancoka avatar ancoka commented on September 26, 2024

我在我mac下未遇到类似的问题,请确认以下内容:

  1. 配置的目录是否存在
  2. Chrome浏览器的版本跟ChromeDriver的版本是否匹配

from hw_seckill.

shelfee avatar shelfee commented on September 26, 2024

image
空格我尝试过加转义和不加转义 都不行

from hw_seckill.

ancoka avatar ancoka commented on September 26, 2024

image 空格我尝试过加转义和不加转义 都不行

我测试下来是不需要添加转义符的

from hw_seckill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.