From 14effc97461d331ff112455f66fc23e4a1971826 Mon Sep 17 00:00:00 2001 From: W1CDN Date: Sat, 15 Apr 2023 14:20:07 -0500 Subject: [PATCH] Try to get working on production. --- kiss_and_db.py | 7 +++++-- requirements.txt | 2 ++ start-aprs_api.sh | 0 3 files changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 start-aprs_api.sh diff --git a/kiss_and_db.py b/kiss_and_db.py index 8a3aa63..c00cfcc 100644 --- a/kiss_and_db.py +++ b/kiss_and_db.py @@ -90,9 +90,12 @@ def main(): # Make this a string and deal with it later (probably a mistake) a['path'] = str(a['path']) # Build an INSERT statement based on the fields we have from the frame - attrib_names = ', '.join(f'"{w}"' for w in a.keys()) + #attrib_names = ', '.join(f'"{w}"' for w in a.keys()) + attrib_names = ', '.join('"%s"' % w for w in a.keys()) attrib_values = ", ".join("?" * len(a.keys())) - sql = f"INSERT INTO frames ({attrib_names}) VALUES ({attrib_values})" + #sql = f"INSERT INTO frames ({attrib_names}) VALUES ({attrib_values})" + sql = "INSERT INTO frames ("+attrib_names+") VALUES ("+attrib_values+")" + print(sql) # Insert data conn.execute(sql, list(a.values())) conn.commit() diff --git a/requirements.txt b/requirements.txt index 8fc2f61..85407aa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ flask flask_restful +aprs +aprslib diff --git a/start-aprs_api.sh b/start-aprs_api.sh old mode 100644 new mode 100755