Skip to content

Commit

Permalink
fix: this_run was removed, so use get_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nachtzuster committed Jun 10, 2024
1 parent e63ed04 commit 0a09e73
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/species.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import numpy as np
import os
import argparse
import datetime
import os

import numpy as np

from utils.helpers import get_settings

try:
import tflite_runtime.interpreter as tflite
Expand Down Expand Up @@ -94,11 +97,10 @@ def getSpeciesList(lat, lon, week, threshold=0.05, sort=False):

userDir = os.path.expanduser('~')
DB_PATH = userDir + '/BirdNET-Pi/scripts/birds.db'
with open(userDir + '/BirdNET-Pi/scripts/thisrun.txt', 'r') as f:

this_run = f.readlines()
lat = str(str(str([i for i in this_run if i.startswith('LATITUDE')]).split('=')[1]).split('\\')[0])
lon = str(str(str([i for i in this_run if i.startswith('LONGITUDE')]).split('=')[1]).split('\\')[0])
conf = get_settings()
lat = conf.getfloat('LATITUDE')
lon = conf.getfloat('LONGITUDE')

weekofyear = datetime.datetime.today().isocalendar()[1]
if __name__ == '__main__':
Expand Down

0 comments on commit 0a09e73

Please sign in to comment.