Skip to content

Fix crash on linux with Arc - #220

Open
teticio wants to merge 1 commit into
borisbabic:masterfrom
teticio:master
Open

Fix crash on linux with Arc#220
teticio wants to merge 1 commit into
borisbabic:masterfrom
teticio:master

Conversation

@teticio

@teticio teticio commented Feb 17, 2025

Copy link
Copy Markdown

Fix crash on linux with Arc

Was getting this error using browser_cookie3.load:

  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 1414, in load
    for cookie in cookie_fn(domain_name=domain_name):
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 1327, in arc
    return Arc(cookie_file, domain_name, key_file).load()
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 707, in __init__
    super().__init__(browser='Arc', cookie_file=cookie_file,
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 445, in __init__
    self.__add_key_and_cookie_file(**kwargs)
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 472, in __add_key_and_cookie_file
    cookie_file = self.cookie_file or _expand_paths(
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 153, in _expand_paths
    return next(_expand_paths_impl(paths, os_name), None)
  File "/home/teticio/ML/kindle2pdf/.venv/lib/python3.10/site-packages/browser_cookie3/__init__.py", line 144, in _expand_paths_impl
    for path in paths:
  File "/usr/lib/python3.10/posixpath.py", line 232, in expanduser
    path = os.fspath(path)

Fix was to add this line to Arc:

            'linux_cookies': [],  # Not available on Linux

Fix crash on linux with Arc
@teticio teticio changed the title Update __init__.py Fix crash on linux with Arc Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant