diff --git a/helpers/geo_helper.py b/helpers/geo_helper.py index 5fe678b..4900732 100644 --- a/helpers/geo_helper.py +++ b/helpers/geo_helper.py @@ -208,11 +208,15 @@ class Geo_helper: today_str = util.getDateStrFormat(now) keyname = "{}:{}".format(keyCateg, today_str) try: - self.serv_redis_db.geoadd(keyname, lon, lat, content) + self.serv_redis_db.geoadd(keyname, [lon, lat, content]) except redis.exceptions.ResponseError as error: print(error) print("Please fix the above, and make sure you use a redis version that supports the GEOADD command.") print("To test for support: echo \"help GEOADD\"| redis-cli") + except redis.exceptions.DataError as error: + print(error) + print("Please fix the above, and make sure you use a redis version that supports the GEOADD command.") + print("To test for support: echo \"help GEOADD\"| redis-cli") self.logger.debug('Added to redis: keyname={}, lon={}, lat={}, content={}'.format(keyname, lon, lat, content)) def push_to_redis_zset(self, keyCateg, toAdd, endSubkey="", count=1):