Matthew Danish
commited on
Commit
•
7a48ca5
1
Parent(s):
f3b8f30
just catch all errors in json decode
Browse files
app.py
CHANGED
@@ -74,9 +74,9 @@ def main(form):
|
|
74 |
result['spatial_params']=spatparams
|
75 |
result['distortion_params']=distparams
|
76 |
result['points_params']=ptsparams
|
77 |
-
|
78 |
result['detections']=json.loads(form['detections'])
|
79 |
-
|
80 |
result['detections']=[]
|
81 |
result['image_points']=[]
|
82 |
|
|
|
74 |
result['spatial_params']=spatparams
|
75 |
result['distortion_params']=distparams
|
76 |
result['points_params']=ptsparams
|
77 |
+
try:
|
78 |
result['detections']=json.loads(form['detections'])
|
79 |
+
except:
|
80 |
result['detections']=[]
|
81 |
result['image_points']=[]
|
82 |
|