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

Exception in python3 + fish #708

Closed
robert-figshare opened this issue Oct 10, 2017 · 0 comments
Closed

Exception in python3 + fish #708

robert-figshare opened this issue Oct 10, 2017 · 0 comments

Comments

@robert-figshare
Copy link

Version: The Fuck 3.23 using Python 3.5.2
OS: Ubuntu 16.04 Gnome
Shell: fish, version 2.2.0

The command works fine in bash, no errors. The python 2 version also works fine in both bash and fish.
When I execute the python 3 version in fish, I get the error below. Any ideas how to fix this?

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('/home/robert/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Total took: 0:00:00.001479
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/thefuck/utils.py", line 231, in _cache
    with closing(shelve.open(cache_path)) as db:
  File "/usr/lib/python3.5/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python3.5/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python3.5/dbm/__init__.py", line 88, in open
    raise error[0]("db type could not be determined")
dbm.error: db type could not be determined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/thefuck/main.py", line 53, in main
    fix_command(known_args)
  File "/usr/local/lib/python3.5/dist-packages/thefuck/main.py", line 29, in fix_command
    command = types.Command.from_raw_script(raw_command)
  File "/usr/local/lib/python3.5/dist-packages/thefuck/types.py", line 75, in from_raw_script
    expanded = shell.from_shell(script)
  File "/usr/local/lib/python3.5/dist-packages/thefuck/shells/generic.py", line 30, in from_shell
    return self._expand_aliases(command_script)
  File "/usr/local/lib/python3.5/dist-packages/thefuck/shells/fish.py", line 47, in _expand_aliases
    aliases = self.get_aliases()
  File "/usr/local/lib/python3.5/dist-packages/thefuck/utils.py", line 33, in wrapper
    memo[key] = fn(*args, **kwargs)
  File "<decorator-gen-4>", line 2, in get_aliases
  File "/usr/local/lib/python3.5/dist-packages/thefuck/utils.py", line 238, in _cache
    except (shelve_open_error, ImportError):
TypeError: catching classes that do not inherit from BaseException is not allowed
nvbn added a commit that referenced this issue Oct 10, 2017
@nvbn nvbn closed this as completed Dec 6, 2017
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants