Closed zisp closed 3 years ago
Does it work when you supply the path to your config file through the command line?
If that's the case it might be enough to replace https://github.com/gazpachoking/trainaspower/blob/f9f81660832edf19df85284a54f24ee25e87df47/trainaspower/main.py#L70 with
default=str(config_file_default_path),
Seems like PathLib treats things differently on Mac.
I don't have a Mac here to test it.
I think I figured it. Found this note in argparse documents:
If the type keyword is used with the default keyword, the type converter is only applied if the default is a string.
Since we are passing a Path
object as the default, it isn't being wrapped by the argparse.FileType
. Should be fixable by just wrapping our default with str()
EDIT: Doh, I didn't even notice this was the same fix you suggested @jahofmann 😝
Definitely fixed it for me, cheers!
trainaspower.log Hi; I just updated (and then reinstalled when I had the same error after updating) TAP 0.6.0, but it's now crashing on startup for me. (Running OSX 11.2.3, python 3.9.4, poetry 1.1.4). I've attached the log file but I don't use python (or poetry) enough o be able to figure out where the issue is. A previous version (0.5.4?) was functioning without issue.