Closed jeffbl closed 3 weeks ago
Go to map on this page: https://www.permatex.com/contact/ trigger "Interpret this map with IMAGE" button watch logs on server
Autour preprocessor seems to work ok:
autour-preprocessor-1 | 2024-08-19T15:18:01.323716309Z [2024-08-19 15:18:01 +0000] [7] [DEBUG] POST /preprocessor autour-preprocessor-1 | 2024-08-19T15:18:01.323915305Z DEBUG:root:Received request content-categoriser-1 | 2024-08-19T15:18:01.324142835Z INFO:root:Request is not a graphic. Skipping... autour-preprocessor-1 | 2024-08-19T15:18:01.325359595Z DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): maps.googleapis.com:443 autour-preprocessor-1 | 2024-08-19T15:18:01.686377611Z DEBUG:urllib3.connectionpool:https://maps.googleapis.com:443 "GET /maps/api/place/textsearch/json?query=PermatexInc.(HQ)6875Pa rklandBlvd,Solon,OH44139&key=AIzaSyCGPAOw7BspKyHcT8PTz5uxH05nLpk9fWI HTTP/11" 200 2118 autour-preprocessor-1 | 2024-08-19T15:18:01.687214624Z DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): isassrv.cim.mcgill.ca:443 autour-preprocessor-1 | 2024-08-19T15:18:03.541434066Z DEBUG:urllib3.connectionpool:https://isassrv.cim.mcgill.ca:443 "GET /autour/getPlaces.php?framed=1×=1&radius=250&lat=41.3 730466&lon=-81.4510732&condensed=0&from=transit%7Cosmxing%7Cosmsegments%7Cfoursquare&as=json&fsqmulti=1&font=9&pad=0 HTTP/11" 200 None autour-preprocessor-1 | 2024-08-19T15:18:03.568410900Z DEBUG:root:Sending response
And a rendering is returned:
However, OSM preprocessor errors out due to invalid placeid parameter
placeid
openstreetmap-1 | 2024-08-19T15:18:03.574497876Z 24-08-19 15:18 UTC [DEBUG]: Received request openstreetmap-1 | 2024-08-19T15:18:03.574972022Z 24-08-19 15:18 UTC [DEBUG]: Validating request object-detection-1 | 2024-08-19T15:18:03.575128989Z INFO:root:No image content. Skipping... depth-map-generator-1 | 2024-08-19T15:18:03.575166911Z INFO:root:Request is not a graphic. Skipping... openstreetmap-1 | 2024-08-19T15:18:03.576108821Z 24-08-19 15:18 UTC [DEBUG]: Starting new HTTPS connection (1): maps.googleapis.com:443 semantic-segmentation-1 | 2024-08-19T15:18:03.634573025Z INFO:root:Schemas loaded openstreetmap-1 | 2024-08-19T15:18:03.689159239Z 24-08-19 15:18 UTC [DEBUG]: https://maps.googleapis.com:443 "GET /maps/api/place/details/json?place_id=PermatexInc.(HQ)6875Par klandBlvd,Solon,OH44139&key=AIzaSyCGPAOw7BspKyHcT8PTz5uxH05nLpk9fWI HTTP/1.1" 200 134 openstreetmap-1 | 2024-08-19T15:18:03.690668973Z 24-08-19 15:18 UTC [ERROR]: No results found for placeID openstreetmap-1 | 2024-08-19T15:18:03.690777608Z 24-08-19 15:18 UTC [ERROR]: {'error_message': "Invalid request. Invalid 'placeid' parameter.", 'html_attributions': [], 'statu s': 'INVALID_REQUEST'} openstreetmap-1 | 2024-08-19T15:18:03.690783379Z 24-08-19 15:18 UTC [DEBUG]: Zero or Incomplete results returned for place ID openstreetmap-1 | 2024-08-19T15:18:03.691349249Z 24-08-19 15:18 UTC [ERROR]: Exception on /preprocessor [POST] openstreetmap-1 | 2024-08-19T15:18:03.691361822Z Traceback (most recent call last): openstreetmap-1 | 2024-08-19T15:18:03.691364768Z File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2529, in wsgi_app openstreetmap-1 | 2024-08-19T15:18:03.691367473Z response = self.full_dispatch_request() openstreetmap-1 | 2024-08-19T15:18:03.691369878Z File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request openstreetmap-1 | 2024-08-19T15:18:03.691372432Z rv = self.handle_user_exception(e) openstreetmap-1 | 2024-08-19T15:18:03.691374777Z File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request openstreetmap-1 | 2024-08-19T15:18:03.691377282Z rv = self.dispatch_request() openstreetmap-1 | 2024-08-19T15:18:03.691379606Z File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request openstreetmap-1 | 2024-08-19T15:18:03.691382010Z return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) openstreetmap-1 | 2024-08-19T15:18:03.691384385Z File "/app/main.py", line 79, in get_map_data openstreetmap-1 | 2024-08-19T15:18:03.691397620Z latitude = coords["latitude"] openstreetmap-1 | 2024-08-19T15:18:03.691400095Z TypeError: tuple indices must be integers or slices, not str semantic-segmentation-1 | 2024-08-19T15:18:04.449962020Z load checkpoint from local path: /app/upernet_beit-base_8x2_640x640_160k_ade20k-eead221d.pth semantic-segmentation-1 | 2024-08-19T15:18:04.850807949Z INFO:root:Model loaded semantic-segmentation-1 | 2024-08-19T15:18:04.851254273Z INFO:root:Not image content. Skipping ... orchestrator-1 | 2024-08-19T15:18:04.870866405Z Error occured on fetch from http://openstreetmap:5000/preprocessor orchestrator-1 | 2024-08-19T15:18:04.870934775Z Now on priority group 4 orchestrator-1 | 2024-08-19T15:18:04.870962607Z FetchError: invalid json response body at http://openstreetmap:5000/preprocessor reason: Unexpected token '<', "<!doctype "... is not valid JSON orchestrator-1 | 2024-08-19T15:18:04.870966484Z at /usr/src/app/node_modules/node-fetch/lib/index.js:273:32 orchestrator-1 | 2024-08-19T15:18:04.870969560Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { orchestrator-1 | 2024-08-19T15:18:04.870972566Z type: 'invalid-json' orchestrator-1 | 2024-08-19T15:18:04.870975381Z } orchestrator-1 | 2024-08-19T15:18:04.871269046Z Sending to preprocessor "object-grouping"
QUESTION: Why does Autour preprocessor get a valid location to produce a rendering, but OSM cannot?
EXPECT: Even if OSM is not able to produce anything useful, it should not be returning invalid JSON.
Maybe related to #472?
Go to map on this page: https://www.permatex.com/contact/ trigger "Interpret this map with IMAGE" button watch logs on server
Autour preprocessor seems to work ok:
And a rendering is returned:
However, OSM preprocessor errors out due to invalid
placeid
parameterQUESTION: Why does Autour preprocessor get a valid location to produce a rendering, but OSM cannot?
EXPECT: Even if OSM is not able to produce anything useful, it should not be returning invalid JSON.