calyx icon indicating copy to clipboard operation
calyx copied to clipboard

Bug in fud if you haven't already created a `~/.config` folder

Open calebmkim opened this issue 2 years ago • 0 comments

In the fud folder, if you haven't manually created a .config folder, then there it says there is no .config/fud file that exists and throws an error. In order to fix this error, you have to manually create the .config folder. We should instead create the folder if it doesn't exist, using makedirs(exist_ok=True). Here is the error message I was getting:

Traceback (most recent call last):
  File "/home/cmk265/.local/bin/fud", line 8, in <module>
    sys.exit(main())
  File "/home/cmk265/.local/lib/python3.8/site-packages/fud/main.py", line 267, in main
    cfg = Configuration()
  File "/home/cmk265/.local/lib/python3.8/site-packages/fud/config.py", line 206, in __init__
    self.path.mkdir(exist_ok=True)
  File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/cmk265/.config/fud'

calebmkim avatar Aug 04 '22 12:08 calebmkim