[問題] pyinstaller編譯完無法執行如何除錯

作者: piligo (霹靂狗)   2020-03-13 02:17:01
我寫了一支撈Chrome Cookie的script
透過pyinstaller編譯完exe,執行卻出現下方這些錯誤
第一次摸python,不知有沒有pyinstaller除錯網站可以參考
script內有掛載這些模組,問題最大的應該就是browser_cookie3
謝謝
import win32api
import sys
import requests
import browser_cookie3
import click
import os
import time
import socket
Traceback (most recent call last):
File "login.py", line 4, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File
"c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\browser_cookie3\__init__.py", line 28, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File
"c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keyring\__init__.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File
"c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keyring\core.py", line 192, in <module>
File "site-packages\keyring\core.py", line 96, in init_backend
File "site-packages\keyring\util\__init__.py", line 22, in wrapper
File "site-packages\keyring\backend.py", line 216, in get_all_keyring
File "site-packages\keyring\backend.py", line 199, in _load_plugins
KeyError: 'keyring.backends'
[2880] Failed to execute script login
作者: piligo (霹靂狗)   2020-03-13 09:03:00
https://github.com/jaraco/keyring/issues/324 解決了keyring降18.0.0就可以用了

Links booklink

Contact Us: admin [ a t ] ucptt.com