keep can't init when howdoi is installed via pipx
Author: justin-f-perezCreated Sep 11, 2021Updated Mar 24, 2022
Labelsbug
What happened:
➜ ~ howdoi --save create an upstream pr using gh cli
sh: keep: command not found
ERROR: No commands found in stash. Add a command with "howdoi --save <query>".
Traceback (most recent call last):
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/howdoi/howdoi.py", line 576, in _stash_save
keep_utils.save_command(cmd_key, answer, title)
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/keep/utils.py", line 192, in save_command
with open(json_path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/username/.keep/commands.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/username/.local/bin/howdoi", line 8, in <module>
sys.exit(command_line_runner())
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/howdoi/howdoi.py", line 810, in command_line_runner
utf8_result = howdoi(args).encode('utf-8', 'ignore')
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/howdoi/howdoi.py", line 623, in howdoi
return _parse_cmd(args, res)
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/howdoi/howdoi.py", line 589, in _parse_cmd
_stash_save(cmd_key, title, answer)
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/howdoi/howdoi.py", line 579, in _stash_save
keep_utils.save_command(cmd_key, answer, title)
File "/Users/username/.local/pipx/venvs/howdoi/lib/python3.9/site-packages/keep/utils.py", line 192, in save_command
with open(json_path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/username/.keep/commands.json'What you expected to happen:
The command to be saved without error
Output with --explain
N/A
Source: gleitz/howdoi