Skip to content

Commit b99e3bd

Browse files
committed
Added retry logic and error handling for scraper and Google Sheets update, improved logging and popup handling, and added credential and sheets managers.
1 parent 709d476 commit b99e3bd

File tree

7 files changed

+1685
-24
lines changed

7 files changed

+1685
-24
lines changed

.github/workflows/update.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
if: always()
4242
run: ls -la
4343

44+
- name: Show log file content
45+
if: always()
46+
run: |
47+
echo "----- LOG FILE CONTENT -----"
48+
cat logs/*.log
49+
4450
- name: Upload debug screenshot artifacts
4551
if: always()
4652
uses: actions/upload-artifact@v4

logs/polla_20250306.log

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
2025-03-06 16:19:35 - INFO - [__main__] - Script started at 2025-03-06T16:19:35.897248
2+
2025-03-06 16:19:36 - INFO - [__main__] - Using user-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
3+
2025-03-06 16:19:41 - ERROR - [__main__] - Error occurred at 2025-03-06T16:19:41.815550
4+
2025-03-06 16:19:41 - ERROR - [__main__] - Message: Failed to create browser instance
5+
2025-03-06 16:19:41 - ERROR - [__main__] - Error code: BROWSER_INIT_ERROR
6+
2025-03-06 16:19:41 - ERROR - [__main__] - Original error: Message: session not created: This version of ChromeDriver only supports Chrome version 134
7+
Current browser version is 133.0.6943.142 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
8+
Stacktrace:
9+
GetHandleVerifier [0x00E9CED3+25523]
10+
(No symbol) [0x00E223B4]
11+
(No symbol) [0x00CF06E3]
12+
(No symbol) [0x00D29F0F]
13+
(No symbol) [0x00D28F49]
14+
(No symbol) [0x00D23E6E]
15+
(No symbol) [0x00D1F3F9]
16+
(No symbol) [0x00D696DD]
17+
(No symbol) [0x00D6910A]
18+
(No symbol) [0x00D5D5F6]
19+
(No symbol) [0x00D2C55F]
20+
(No symbol) [0x00D2D8A4]
21+
GetHandleVerifier [0x011A2713+3193843]
22+
GetHandleVerifier [0x011B69E9+3276489]
23+
GetHandleVerifier [0x011B0F0C+3253228]
24+
GetHandleVerifier [0x00F3B0C0+673184]
25+
(No symbol) [0x00E2B43D]
26+
(No symbol) [0x00E28568]
27+
(No symbol) [0x00E28709]
28+
(No symbol) [0x00E1AE90]
29+
BaseThreadInitThunk [0x76047BA9+25]
30+
RtlInitializeExceptionChain [0x77C2C2EB+107]
31+
RtlClearBits [0x77C2C26F+191]
32+
Traceback (most recent call last):
33+
File "c:\Users\corte\OneDrive\Python scripts\polla\test\test.py", line 228, in get_driver
34+
self._driver = webdriver.Chrome(options=options)
35+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
37+
super().__init__(
38+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 66, in __init__
39+
super().__init__(command_executor=executor, options=options)
40+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 208, in __init__
41+
self.start_session(capabilities)
42+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 292, in start_session
43+
response = self.execute(Command.NEW_SESSION, caps)["value"]
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute
46+
self.error_handler.check_response(response)
47+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
48+
raise exception_class(message, screen, stacktrace)
49+
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 134
50+
Current browser version is 133.0.6943.142 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
51+
Stacktrace:
52+
GetHandleVerifier [0x00E9CED3+25523]
53+
(No symbol) [0x00E223B4]
54+
(No symbol) [0x00CF06E3]
55+
(No symbol) [0x00D29F0F]
56+
(No symbol) [0x00D28F49]
57+
(No symbol) [0x00D23E6E]
58+
(No symbol) [0x00D1F3F9]
59+
(No symbol) [0x00D696DD]
60+
(No symbol) [0x00D6910A]
61+
(No symbol) [0x00D5D5F6]
62+
(No symbol) [0x00D2C55F]
63+
(No symbol) [0x00D2D8A4]
64+
GetHandleVerifier [0x011A2713+3193843]
65+
GetHandleVerifier [0x011B69E9+3276489]
66+
GetHandleVerifier [0x011B0F0C+3253228]
67+
GetHandleVerifier [0x00F3B0C0+673184]
68+
(No symbol) [0x00E2B43D]
69+
(No symbol) [0x00E28568]
70+
(No symbol) [0x00E28709]
71+
(No symbol) [0x00E1AE90]
72+
BaseThreadInitThunk [0x76047BA9+25]
73+
RtlInitializeExceptionChain [0x77C2C2EB+107]
74+
RtlClearBits [0x77C2C26F+191]
75+
76+
77+
During handling of the above exception, another exception occurred:
78+
79+
Traceback (most recent call last):
80+
File "c:\Users\corte\OneDrive\Python scripts\polla\test\test.py", line 474, in run
81+
with self.browser_manager:
82+
^^^^^^^^^^^^^^^^^^^^
83+
File "c:\Users\corte\OneDrive\Python scripts\polla\test\test.py", line 243, in __enter__
84+
self.get_driver()
85+
File "c:\Users\corte\OneDrive\Python scripts\polla\test\test.py", line 232, in get_driver
86+
raise ScriptError("Failed to create browser instance", e, "BROWSER_INIT_ERROR")
87+
ScriptError: [BROWSER_INIT_ERROR] Failed to create browser instance Original error: Message: session not created: This version of ChromeDriver only supports Chrome version 134
88+
Current browser version is 133.0.6943.142 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
89+
Stacktrace:
90+
GetHandleVerifier [0x00E9CED3+25523]
91+
(No symbol) [0x00E223B4]
92+
(No symbol) [0x00CF06E3]
93+
(No symbol) [0x00D29F0F]
94+
(No symbol) [0x00D28F49]
95+
(No symbol) [0x00D23E6E]
96+
(No symbol) [0x00D1F3F9]
97+
(No symbol) [0x00D696DD]
98+
(No symbol) [0x00D6910A]
99+
(No symbol) [0x00D5D5F6]
100+
(No symbol) [0x00D2C55F]
101+
(No symbol) [0x00D2D8A4]
102+
GetHandleVerifier [0x011A2713+3193843]
103+
GetHandleVerifier [0x011B69E9+3276489]
104+
GetHandleVerifier [0x011B0F0C+3253228]
105+
GetHandleVerifier [0x00F3B0C0+673184]
106+
(No symbol) [0x00E2B43D]
107+
(No symbol) [0x00E28568]
108+
(No symbol) [0x00E28709]
109+
(No symbol) [0x00E1AE90]
110+
BaseThreadInitThunk [0x76047BA9+25]
111+
RtlInitializeExceptionChain [0x77C2C2EB+107]
112+
RtlClearBits [0x77C2C26F+191]
113+
114+
2025-03-06 16:19:41 - ERROR - [__main__] - Traceback:
115+
Traceback (most recent call last):
116+
File "c:\Users\corte\OneDrive\Python scripts\polla\test\test.py", line 228, in get_driver
117+
self._driver = webdriver.Chrome(options=options)
118+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
120+
super().__init__(
121+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 66, in __init__
122+
super().__init__(command_executor=executor, options=options)
123+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 208, in __init__
124+
self.start_session(capabilities)
125+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 292, in start_session
126+
response = self.execute(Command.NEW_SESSION, caps)["value"]
127+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute
129+
self.error_handler.check_response(response)
130+
File "C:\Users\corte\OneDrive\Python scripts\polla\.venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
131+
raise exception_class(message, screen, stacktrace)
132+
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 134
133+
Current browser version is 133.0.6943.142 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
134+
Stacktrace:
135+
GetHandleVerifier [0x00E9CED3+25523]
136+
(No symbol) [0x00E223B4]
137+
(No symbol) [0x00CF06E3]
138+
(No symbol) [0x00D29F0F]
139+
(No symbol) [0x00D28F49]
140+
(No symbol) [0x00D23E6E]
141+
(No symbol) [0x00D1F3F9]
142+
(No symbol) [0x00D696DD]
143+
(No symbol) [0x00D6910A]
144+
(No symbol) [0x00D5D5F6]
145+
(No symbol) [0x00D2C55F]
146+
(No symbol) [0x00D2D8A4]
147+
GetHandleVerifier [0x011A2713+3193843]
148+
GetHandleVerifier [0x011B69E9+3276489]
149+
GetHandleVerifier [0x011B0F0C+3253228]
150+
GetHandleVerifier [0x00F3B0C0+673184]
151+
(No symbol) [0x00E2B43D]
152+
(No symbol) [0x00E28568]
153+
(No symbol) [0x00E28709]
154+
(No symbol) [0x00E1AE90]
155+
BaseThreadInitThunk [0x76047BA9+25]
156+
RtlInitializeExceptionChain [0x77C2C2EB+107]
157+
RtlClearBits [0x77C2C26F+191]
158+
159+
160+
2025-03-06 16:19:45 - INFO - [__main__] - Script completed in 10.02 seconds

0 commit comments

Comments
 (0)