tkuester / taky

A simple python TAK server
MIT License
184 stars 43 forks source link

taky won't run without a config file #58

Open tkuester opened 2 years ago

tkuester commented 2 years ago
➜  ~ taky -l debug
INFO:root:taky v0.9a1
usage: taky [-h] [-l {debug,info,warning,error,critical}] [-c CFG_FILE] [-d] [--version]
taky: error: Unable to load './taky.conf' or '/etc/taky.conf'

Thanks to our users in Discord for finding this bug!

tkuester commented 2 years ago

There is another issue that has come up related to this. With the new features (ie: management sock), the config option for taky.root_dir has become more critical. Having discussed this issue with the helpful users in the Discord, we have come to the conclusion that the solution is to create a directory in the working path, and proceed from there.

A brief recount of the discussion, for posterity:

One option is to have the COT server simply not create the management socket when running "configuration-less". However, what should the data package server do? Without a directory to place uploaded data packages, the data package server is effectively useless. This expands the problem size.

We could simply do away with the "configuration-less" feature, but the users voted against this, as they found it to be useful.

Another option is to create a temporary directory with tempfile -- but this creates more problems than it solves. Should the files be deleted after usage? Leaving them will clutter the user's system with obscure paths, but deleting them may get rid of valuable user data.

The simplest option, proposed by the userbase, is to create a directory in the current working directory, and notify the user. And so that is what we will adopt!

tkuester commented 2 years ago

Commits 63e4f68..a3679a0 have the fix for this -- but has only been preliminarily tested.

tkuester commented 1 year ago

Due to my sloppy development practices, I can't confirm this fix has fully made it into 0.9. I have checked to confirm that taky runs without a config file, but this needs a little more careful review.