Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load cookie from newest Chrome #176

Closed
wfjeefwe opened this issue Aug 3, 2023 · 2 comments
Closed

Can't load cookie from newest Chrome #176

wfjeefwe opened this issue Aug 3, 2023 · 2 comments
Labels
dependency problems related to dependency

Comments

@wfjeefwe
Copy link

wfjeefwe commented Aug 3, 2023

使用:pip install bilix --upgrade 升级为最新0.18.4,出现以下问题,无法下载,升级前可以正常下载。

bilix s https://space.bilibili.com/39371517/channel/series -fb chrome

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\bilix.exe_main
.py", line 7, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\cli\main.py", line 373, in main
executor, cor = assign(kwargs)
^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\cli\assign.py", line 143, in assign
res = handle_func(method, keys, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\cli\assign.py", line 64, in wrapped
res = handle_func(cls, method, keys, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\sites\bilibili\downloader.py", line 527, in handle
d = cls(sess_data=options['cookie'], **kwargs_filter(cls, options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\sites\bilibili\downloader.py", line 54, in init
super(DownloaderBilibili, self).init(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\download\base_downloader_part.py", line 35, in init
super(BaseDownloaderPart, self).init(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\download\base_downloader.py", line 109, in init
self.update_cookies_from_browser(browser)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\bilix\download\base_downloader.py", line 209, in update_cookies_from_browser
self.client.cookies.update(f(domain_name=self.cookie_domain))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 973, in chrome
return Chrome(cookie_file, domain_name, key_file).load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 387, in load
con = sqlite3_connect_readonly(self.cookie_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\browser_cookie3_init
.py", line 145, in _sqlite3_connect_readonly
con = sqlite3.connect(uri + options, uri=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file

@yzqzss
Copy link
Contributor

yzqzss commented Aug 3, 2023

ref: borisbabic/browser_cookie3#180

这个问题与 bilix 无关,是 Chrome 新版会 LockProfileCookieDatabase 导致的。

@wfjeefwe
Copy link
Author

wfjeefwe commented Aug 4, 2023

ref: borisbabic/browser_cookie3#180

这个问题与 bilix 无关,是 Chrome 新版会 LockProfileCookieDatabase 导致的。

非常感谢。

@HFrost0 HFrost0 changed the title 之前使用没问题,最近出现问题,请教 Can't load cookie from newest Chrome Aug 4, 2023
@HFrost0 HFrost0 added the dependency problems related to dependency label Aug 4, 2023
@HFrost0 HFrost0 closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency problems related to dependency
Projects
None yet
Development

No branches or pull requests

3 participants