leon 3 weeks ago
parent
commit
1931b68047
2 changed files with 5 additions and 5 deletions
  1. 2 2
      server/config.py
  2. 3 3
      server/test.py

+ 2 - 2
server/config.py

@@ -4,7 +4,7 @@ class Config:
         'url' : "http://172.19.152.231/open/api/operate/upload",
         'classIndex': "68",
         'nvr': "172.19.152.231",
-        'ip2channle' : {
+        'ip2channel' : {
             "172.19.152.181" : "251",
             "172.19.152.182" : "252",
         }
@@ -15,7 +15,7 @@ class Config:
         'url' : "http://36.7.84.146:28801/open/api/operate/upload",
         'classIndex': "101",
         'nvr': "172.16.20.251",
-        'ip2channle' : {
+        'ip2channel' : {
             "172.19.152.181" : "251",
             "172.19.152.182" : "252",
         }

+ 3 - 3
server/test.py

@@ -44,10 +44,10 @@ async def local_test():
                     # draw(img, text, (100, 100))
                     # byte_data = pil2byte(img)
                     # img.show()
-                    if ip_addr not in conf["ip2channle"]:
-                        logger.info(f"{ip_addr} not in ip2channle")
+                    if ip_addr not in conf["ip2channel"]:
+                        logger.info(f"{ip_addr} not in ip2channel")
                         return
-                    channel = conf["ip2channle"][ip_addr]
+                    channel = conf["ip2channel"][ip_addr]
                     res = await upload(url, channel, classIndex, nvr, videoTime, filename, imagedata, plate, speed)
                     logger.info(res)
             except Exception as error: