'Initializing database correctly in virtual environment
I was following along with a Real Python tutorial on creating a CLI to-do application (https://realpython.com/python-typer-cli/#step-3-prepare-the-to-do-database-for-use), and I'm running into a problem in initializing the database. In step 3 "Implement the init CLI command", my program is returning the error "Creating config file failed with "config directory error". I'm using the goormIDE to run a virtual python environment, and my current directory is /workspace/Scheduler, with three directories rptodo, tests and venv, along with some files index.py, requirements.txt and the README.
The problem is in line 28 of the config.py file under the section "Prepare the To-Do database for use", where
Path(typer.get_app_dir(app_name)
isn't working, causing the except to return the DIR_ERROR. I'm pretty sure it's a result of using goorm, so is there a way to initialize the database using a specific path that will cause it to initialize without any problem? The flag would be --db-path, but since this is an online interpreter instead of my machine, I'm not sure what path to use. Any insight would be greatly appreciated!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
