Closed feng22cn closed 1 year ago
不知道你拉取的镜像是哪一个标签?
不知道你拉取的镜像是哪一个标签? 这个标签: renhai/sgcc_electricity:armv7-latest
CPU应该不会错 pi@raspberrypi:~ $ sudo lscpu Architecture: armv7l Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Vendor ID: ARM Model: 4 Model name: Cortex-A53 Stepping: r0p4 CPU max MHz: 1400.0000 CPU min MHz: 600.0000 BogoMIPS: 89.60 Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
看样子是selenium的webdriver没有配置好,我是用github编译的armv7镜像,只在arm64测试过armv7的镜像,当时是没问题的。😐
树莓派3B+,docker版本 24.0.5 Server: Docker Engine - Community Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.6
设置不需要存储在mongodb 运行 docker compose up之后,提示如下:
pi@raspberrypi:~/sgcc_electricity $ sudo docker compose up [+] Running 2/2 ✔ Network sgcc_electricity_sgcc_network Created 1.1s ✔ Container sgcc_electricity Created 6.0s Attaching to sgcc_electricity sgcc_electricity | 2023-08-31 17:29:42 [INFO ] ---- 程序开始,当前仓库版本为1.3.2,仓库地址为https://github.com/renhaiidea/sgcc_electricity sgcc_electricity | find: ‘/root/.config/chromium/Crash Reports/pending/’: No such file or directory sgcc_electricity | 2023-08-31 17:29:54 [INFO ] ---- chromium-driver version is 115 sgcc_electricity | 2023-08-31 17:29:54 [INFO ] ---- enable_database_storage为false,不会储存到数据库 sgcc_electricity | 2023-08-31 17:29:54 [INFO ] ---- 当前登录的用户名为: 186XXXXXXXX,homeassistant地址为http://192.168.31.17:8123/,程序将在每天07:00执行 sgcc_electricity | 2023-08-31 17:29:54 [INFO ] ---- 此次为首次运行,等待时间(FIRST_SLEEP_TIME)为10秒,可在.env中设 置 sgcc_electricity | 2023-08-31 17:30:05 [INFO ] ---- patching driver executable /usr/bin/chromedriver sgcc_electricity | Traceback (most recent call last): sgcc_electricity | File "/app/data_fetcher.py", line 90, in fetch sgcc_electricity | return self._fetch() sgcc_electricity | File "/app/data_fetcher.py", line 103, in _fetch sgcc_electricity | driver = self._get_webdriver() sgcc_electricity | File "/app/data_fetcher.py", line 135, in _get_webdriver sgcc_electricity | driver = uc.Chrome(driver_executable_path="/usr/bin/chromedriver", options=chrome_options, version_main=self._chromium_version) sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 453, in init sgcc_electricity | super(Chrome, self).init( sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in init sgcc_electricity | super().init(DesiredCapabilities.CHROME['browserName'], "goog", sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 92, in init sgcc_electricity | super().init( sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 272, in init sgcc_electricity | self.start_session(capabilities, browser_profile) sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 716, in start_session sgcc_electricity | super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session( sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 364, in start_session sgcc_electricity | response = self.execute(Command.NEW_SESSION, parameters) sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute sgcc_electricity | self.error_handler.check_response(response) sgcc_electricity | File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response sgcc_electricity | raise exception_class(message, screen, stacktrace) sgcc_electricity | selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:38069 sgcc_electricity | from chrome not reachable sgcc_electricity | sgcc_electricity | sgcc_electricity | 2023-08-31 17:31:08 [ERROR ] ---- Webdriver quit abnormly, reason: Message: unknown error: cannot connect to chrome at 127.0.0.1:38069 sgcc_electricity | from chrome not reachable sgcc_electricity | . 4 retry times left.