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

[BUG] Directory .what-to-eat is not created when running "configure" on a clean installation #101

Open
Realiserad opened this issue Mar 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Realiserad
Copy link

Realiserad commented Mar 1, 2024

Describe the bug

Very nice little program! But I found a small issue setting it up.

My environment is Ubuntu 22.04.4 and fish 3.7.0.

To Reproduce

This is what I did:

  1. Install using pip
pip3 install what-to-eat
  1. Install completions for fish (this works)
what-to-eat --install-completion
  1. Trying to create a profile
> what-to-eat configure
[?] What do you want to do?: 
 > Create new configuration
   Add profile
   List profiles
   Edit profile
   Set profile as default
   Remove profile

[?] Profile name: Default
[?] Your address: Stockholm
💥 Unexpected error: [Errno 2] No such file or directory: 
'/home/bastian/.what-to-eat/.what-to-eat-cache.json'

Expected behavior

The directory $HOME/.what-to-eat should be created if it does not exist.

Screenshots

image

@Realiserad Realiserad added the bug Something isn't working label Mar 1, 2024
@Realiserad
Copy link
Author

Since I have an old Python 3.10, I got an older version from pip (version 1.0.4).

I tried to set it up inside a container with the latest version and I was not able to reproduce the problem.

@Realiserad
Copy link
Author

I got it working in Ubuntu 22 using a virtual environment.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.12 python3.12-venv
mkdir ~/.venvs
python3.12 -m venv ~/.venvs/what-to-eat
~/.venvs/what-to-eat/bin/pip install what-to-eat
ln -s ~/.venvs/what-to-eat/bin/what-to-eat ~/.local/bin/what-to-eat
what-to-eat --install-completion
what-to-eat configure

Maybe something to add to the README.md?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants