Thanks to visit codestin.com
Credit goes to github.com

Skip to content

~/.cache/thefuck not found #835

@mu-hun

Description

@mu-hun

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0):

The Fuck 3.27 using Python 3.7.0

Your shell and its version (bash, zsh, Windows PowerShell, etc.):

fish, version 2.7.1-929-gb575e120

Shell configure file config.fish :

if __available thefuck
 thefuck --alias | source
end

Your system (Debian 7, ArchLinux, Windows, etc.):

macOS High Sierra version 10.13.5

How to reproduce the bug:

~  fuck # just type fuck

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'history_limit': None,
 'instant_mode': False,
 'no_colors': False,
 'priority': {},
 'repeat': False,
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('~/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
[WARN] Removing possibly out-dated cache
DEBUG: Total took: 0:00:00.002215
Traceback (most recent call last):
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/utils.py", line 197, in _init_db
    self._db = shelve.open(cache_path)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dbm/__init__.py", line 94, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 12, in <module>
    sys.exit(main())
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/entrypoints/main.py", line 25, in main
    fix_command(known_args)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/entrypoints/fix_command.py", line 36, in fix_command
    command = types.Command.from_raw_script(raw_command)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/types.py", line 81, in from_raw_script
    expanded = shell.from_shell(script)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/shells/generic.py", line 30, in from_shell
    return self._expand_aliases(command_script)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/shells/fish.py", line 73, in _expand_aliases
    aliases = self.get_aliases()
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/shells/fish.py", line 67, in get_aliases
    functions = _get_functions(overridden)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/utils.py", line 33, in wrapper
    memo[key] = fn(*args, **kwargs)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/utils.py", line 267, in wrapper
    return _cache.get_value(fn, depends_on, args, kwargs)
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/utils.py", line 233, in get_value
    self._init_db()
  File "/usr/local/Cellar/thefuck/3.27_1/libexec/lib/python3.7/site-packages/thefuck/utils.py", line 201, in _init_db
    os.remove(cache_path)
FileNotFoundError: [Errno 2] No such file or directory: '~/.cache/thefuck'

Anything else you think is relevant:

I saw #71 #807 but I have not found yet solution.

And ~/.cache/thefuck not in ~/.cache

 ~  ls .cache/
bower         gstreamer-1.0
 ~  ls .cache/thefuck
ls: .cache/thefuck: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions