tixcraft_bot icon indicating copy to clipboard operation
tixcraft_bot copied to clipboard

Mac M1 ChromeDriver Error

Open PinQ1122 opened this issue 2 years ago • 2 comments

執行搶票程式時出現下列訊息:

setting app version: MaxBot (2023.11.22) python version: 3.10.0 platform: macOS-14.0-arm64-arm-64bit run button pressed. save config result: True execute in shell mode. try python3 maxbot app version: MaxBot (2023.11.22) python version: 3.10.0 platform: macOS-14.0-arm64-arm-64bit homepage: https://tixcraft.com/activity/detail/23_abc30 browser: chrome ticket_number: 4 webdriver_type: undetected_chromedriver ChromeDriver exist: webdriver/chromedriver Message: Service webdriver/chromedriver unexpectedly exited. Status code was: -9

Deleting exist and download ChromeDriver again. CHROME >= 115, using mac-arm64 as architecture identifier CHROME >= 115, using mac-arm64 as architecture identifier Failed to download chromedriver archive: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/mac-arm64/chromedriver-mac-arm64.zip WebDriver object is None..., try again.. <urlopen error [Errno 60] Operation timed out> create web drive object by undetected_chromedriver fail! 建議您自行下載 ChromeDriver 到 webdriver 的資料夾下 you need manually download ChromeDriver to webdriver folder. create web driver object fail @_@; web driver not accessible! Exception ignored in: <function Chrome.del at 0x102c8f0a0> Traceback (most recent call last): File "/Users/pinq/Downloads/MaxBot.app/Contents/Resources/undetected_chromedriver/init.py", line 679, in del self.quit() File "/Users/pinq/Downloads/MaxBot.app/Contents/Resources/undetected_chromedriver/init.py", line 623, in quit shutil.rmtree(self.user_data_dir, ignore_errors=False) NameError: name 'shutil' is not defined

---------------我是分隔線---------------

我手動下載的檔案就是 https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/mac-arm64/chromedriver-mac-arm64.zip

放入的位置應該也沒錯才會出現有被 Deleting exist and download ChromeDriver again.的訊息

Chrome版本是119.0.6045.199,難道是因為Chrome版本太新嗎QQ?

PinQ1122 avatar Nov 29 '23 05:11 PinQ1122

我的環境也跟你的一樣,也有遇到一樣的問題,我是用下面的方法解決

  1. 先載好 chrome driver,並先複製好執行檔
  2. 當輸出到「WebDriver object is None..., try again..」時,將 chrome driver 執行檔貼到 webdriver 資料夾內
  3. 接著就會看到「try read local...」類似這種的字眼輸出
  4. 就可以使用了

leoho0722 avatar Nov 29 '23 17:11 leoho0722

我的環境也跟你的一樣,也有遇到一樣的問題,我是用下面的方法解決

  1. 先載好 chrome driver,並先複製好執行檔
  2. 當輸出到「WebDriver object is None..., try again..」時,將 chrome driver 執行檔貼到 webdriver 資料夾內
  3. 接著就會看到「try read local...」類似這種的字眼輸出
  4. 就可以使用了

感謝,這樣的方式確實可以使用。

PinQ1122 avatar Dec 04 '23 03:12 PinQ1122

請參考這部影片的解法, 透過原始碼執行MaxBot教學影片: https://youtu.be/HpVG91j0lbI

Step 1: 取得source code:

git clone https://github.com/max32002/tixcraft_bot.git

Step 2: 進入 clone 的資料夾: tixcraft_bot:

cd tixcraft_bot

Step 3: 安裝第三方套件:

python3 -m pip install -r pip-req.txt

Step 4: 執行設定界面主桯式:

python3 settings.py

如果遇到MaxBot 改版, 請重新操作上面4個步驟一次, 即可取得新的版本.

如果MaxBot 沒改版, 第二次要再執行的話, 使用 Step 2 + Step 4, 這2行指令, 就可以執行 MaxBot.

如果你是 ARM CPU 應該會在 Step 3 就顯示錯誤訊息, 解法: https://github.com/max32002/tixcraft_bot/issues/82#issuecomment-1878986084

以上, 應該是在 M1/M2 的 ARM CPU 的 macOS 正常地OCR 的解法, 聽說 macOS 上使用 brave 瀏覽器會快一點點, 沒試過, 不太清楚.

如果還有其他的問題, 歡迎再開 issue.

max32002 avatar Jan 31 '24 08:01 max32002

當你做了step 1,理論上就不會出現step 2, 就會看到畫面顯示step 3.

Savvy Bee @.***> 於 2024年2月18日 週日 下午11:32 寫道:

我的環境也跟你的一樣,也有遇到一樣的問題,我是用下面的方法解決

  1. 先載好 chrome driver,並先複製好執行檔

  2. 當輸出到「WebDriver object is None..., try again..」時,將 chrome driver 執行檔貼到 webdriver 資料夾內

  3. 接著就會看到「try read local...」類似這種的字眼輸出

  4. 就可以使用了

請問要怎麼在輸出到「WebDriver object is None..., try again..」時,貼到webdriver資料夾內啊?他很快就跳去下一行了。

— Reply to this email directly, view it on GitHub https://github.com/max32002/tixcraft_bot/issues/143#issuecomment-1951359415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCKGONISASHY4MONPEEBCLYUINHJAVCNFSM6AAAAAA763NEIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGM2TSNBRGU . You are receiving this because you modified the open/close state.Message ID: @.***>

max32002 avatar Feb 18 '24 15:02 max32002

當你做了step 1,理論上就不會出現step 2, 就會看到畫面顯示step 3. Savvy Bee @.> 於 2024年2月18日 週日 下午11:32 寫道: 我的環境也跟你的一樣,也有遇到一樣的問題,我是用下面的方法解決 1. 先載好 chrome driver,並先複製好執行檔 2. 當輸出到「WebDriver object is None..., try again..」時,將 chrome driver 執行檔貼到 webdriver 資料夾內 3. 接著就會看到「try read local...」類似這種的字眼輸出 4. 就可以使用了 請問要怎麼在輸出到「WebDriver object is None..., try again..」時,貼到webdriver資料夾內啊?他很快就跳去下一行了。 — Reply to this email directly, view it on GitHub <#143 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCKGONISASHY4MONPEEBCLYUINHJAVCNFSM6AAAAAA763NEIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGM2TSNBRGU . You are receiving this because you modified the open/close state.Message ID: @.>

目前看起來併不是的,mac m1版本會出現報錯 -9,不知道是什麽原因。

maxbot app version: MaxBot (2024.01.20) python version: 3.8.10 platform: macOS-14.3.1-arm64-arm-64bit homepage: https://ticketmaster.sg browser: chrome webdriver_type: undetected_chromedriver ChromeDriver exist: webdriver/chromedriver Message: Service webdriver/chromedriver unexpectedly exited. Status code was: -9

Deleting exist and download ChromeDriver again. CHROME >= 115, using mac-arm64 as architecture identifier download webdriver from url: https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.184/mac-arm64/chromedriver-mac-arm64.zip Message: Service webdriver/chromedriver unexpectedly exited. Status code was: -9

WebDriver object is still None..., try download by uc. HTTP Error 404: Not Found create web drive object by undetected_chromedriver fail! Unable to use undetected_chromedriver, try to use local chromedriver to launch chrome browser. create web driver object fail @_@; web driver not accessible!

leongyeehang avatar Feb 18 '24 16:02 leongyeehang