- 积分
- 298
- 金钱
- 257
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 298
- 金钱
- 257
- HASS币
- 0
|
发表于 2022-11-11 10:38:28
|
显示全部楼层
楼主,已经升级到最新的V1.1,已经调高两个等待时间参数,5次全失败,依旧报错,日志如下:
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f68ff05c950>
2022-11-11 10:25:42 [INFO ] ---- Webdriver initialized.
2022-11-11 10:26:03 [INFO ] ---- Login successfully on https://www.95598.cn/osgweb/login
2022-11-11 10:26:06 [INFO ] ---- get all user id: ['32xxxxxxxx53960']
2022-11-11 10:30:10 [ERROR ] ---- Webdriver quit abnormly, reason: Message: no such element: Unable to locate element: {"method":"css selector","selector":".num"}
(Session info: headless chrome=90.0.4430.212)
Stacktrace:
#0 0x55f523fce7f9 <unknown>
#1 0x55f523f6e3b3 <unknown>
#2 0x55f523cb6016 <unknown>
#3 0x55f523cea81e <unknown>
#4 0x55f523d208fb <unknown>
#5 0x55f523d0dded <unknown>
#6 0x55f523d1e9e1 <unknown>
#7 0x55f523d0dc93 <unknown>
#8 0x55f523cdfce4 <unknown>
#9 0x55f523ce14d2 <unknown>
#10 0x55f523f9a542 <unknown>
#11 0x55f523fa9ce7 <unknown>
#12 0x55f523fa99e4 <unknown>
#13 0x55f523fae13a <unknown>
#14 0x55f523faa5b9 <unknown>
#15 0x55f523f8fe00 <unknown>
#16 0x55f523fc15d2 <unknown>
#17 0x55f523fc1778 <unknown>
#18 0x55f523fd9a1f <unknown>
#19 0x7f1516289fa3 start_thread
#20 0x7f15154e006f clone
. 1 retry times left.
Traceback (most recent call last):
File "/app/data_fetcher.py", line 30, in fetch
return self._fetch()
File "/app/data_fetcher.py", line 53, in _fetch
balance_list = self._get_electric_balances(driver, user_id_list)
File "/app/data_fetcher.py", line 126, in _get_electric_balances
balance = self._get_eletric_balance(driver)
File "/app/data_fetcher.py", line 183, in _get_eletric_balance
balance = driver.find_element(By.CLASS_NAME,"num").text
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 856, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".num"}
(Session info: headless chrome=90.0.4430.212)
Stacktrace:
#0 0x55f523fce7f9 <unknown>
#1 0x55f523f6e3b3 <unknown>
#2 0x55f523cb6016 <unknown>
#3 0x55f523cea81e <unknown>
#4 0x55f523d208fb <unknown>
#5 0x55f523d0dded <unknown>
#6 0x55f523d1e9e1 <unknown>
#7 0x55f523d0dc93 <unknown>
#8 0x55f523cdfce4 <unknown>
#9 0x55f523ce14d2 <unknown>
#10 0x55f523f9a542 <unknown>
#11 0x55f523fa9ce7 <unknown>
#12 0x55f523fa99e4 <unknown>
#13 0x55f523fae13a <unknown>
#14 0x55f523faa5b9 <unknown>
#15 0x55f523f8fe00 <unknown>
#16 0x55f523fc15d2 <unknown>
#17 0x55f523fc1778 <unknown>
#18 0x55f523fd9a1f <unknown>
#19 0x7f1516289fa3 start_thread
#20 0x7f15154e006f clone
2022-11-11 10:30:51 [INFO ] ---- Webdriver initialized.
2022-11-11 10:31:07 [INFO ] ---- Login successfully on https://www.95598.cn/osgweb/login
2022-11-11 10:31:10 [INFO ] ---- get all user id: ['320xxxxxxx53960']
2022-11-11 10:35:13 [ERROR ] ---- state-refresh task failed, reason is Message: no such element: Unable to locate element: {"method":"css selector","selector":".num"}
(Session info: headless chrome=90.0.4430.212)
Stacktrace:
#0 0x55bc261aa7f9 <unknown>
#1 0x55bc2614a3b3 <unknown>
#2 0x55bc25e92016 <unknown>
#3 0x55bc25ec681e <unknown>
#4 0x55bc25efc8fb <unknown>
#5 0x55bc25ee9ded <unknown>
#6 0x55bc25efa9e1 <unknown>
#7 0x55bc25ee9c93 <unknown>
#8 0x55bc25ebbce4 <unknown>
#9 0x55bc25ebd4d2 <unknown>
#10 0x55bc26176542 <unknown>
#11 0x55bc26185ce7 <unknown>
#12 0x55bc261859e4 <unknown>
#13 0x55bc2618a13a <unknown>
#14 0x55bc261865b9 <unknown>
#15 0x55bc2616be00 <unknown>
#16 0x55bc2619d5d2 <unknown>
#17 0x55bc2619d778 <unknown>
#18 0x55bc261b5a1f <unknown>
#19 0x7fc84a40dfa3 start_thread
#20 0x7fc84966406f clone
hass是hyper-v下的虚拟机,采用第一种,addons 方式部署的。
系统版本:
Home Assistant 2022.11.2
Supervisor 2022.10.2
Operating System 9.3
前端版本: 20221108.0 - latest
麻烦楼主看一下,万分感谢! |
|