Closed elemoine closed 7 years ago
It worked in staging mode in https://travis-ci.org/LI3DS/micmac_li3ds/builds/231553037 . Could you please provide the actual command lines to reproduce the error, as well as the log of api-li3ds ?
Yes, I will investigate further.
This is what I am seeing in the api-li3ds logs:
ERROR in database [/home/elemoine/src/api-li3ds/api_li3ds/database.py:23]:
ERROR: invalid input syntax for type timestamp with time zone: "None"
LINE 5: ....0], "lambda": [-3.14159265359, 3.14159265359]}', 'None', NU...
^
--------------------------------------------------------------------------------
127.0.0.1 - - [15/May/2017 14:17:09] "POST /transfos/ HTTP/1.1" 404 -
Here is a full log of the mm2li command line:
$ mm2li --verbose import-orimatis -u http://localhost:5000 -k aaaabbbbcccc data/spheric.ori.xml
mm2li import-orimatis
Importing data/spheric.ori.xml
-->{"name": "cartesian_to_spherical", "func_signature": ["lambda", "phi", "ppa"]}
Starting new HTTP connection (1): localhost
http://localhost:5000 "GET /transfos/types/ HTTP/1.1" 200 2262
<--{"id": 9, "name": "cartesian_to_spherical", "func_signature": ["lambda", "phi", "ppa"], "description": null}
? (9) transfos/type [cartesian_to_spherical]
-->{"name": "None", "specifications": {"image_size": [1920.0, 1920.0]}, "type": "camera", "serial_number": "None", "description": "Imported from \"spheric.ori.xml\""}
Starting new HTTP connection (1): localhost
http://localhost:5000 "GET /sensors/ HTTP/1.1" 200 5169
<--{"id": 11, "name": "None", "specifications": {"image_size": [1920.0, 1920.0]}, "brand": null, "description": "Imported from \"spheric.ori.xml\"", "type": "camera", "model": null, "serial_number": "None"}
? (11) sensor [None]
-->{"name": "0", "sensor": 11, "description": "origin: camera position, +X: right of the camera, +Y: bottom of the camera, +Z: optical axis (in front of the camera). Imported from \"spheric.ori.xml\""}
Starting new HTTP connection (1): localhost
http://localhost:5000 "GET /referentials/ HTTP/1.1" 200 14451
<--{"srid": null, "id": 36, "name": "0", "sensor": 11, "description": "origin: camera position, +X: right of the camera, +Y: bottom of the camera, +Z: optical axis (in front of the camera). Imported from \"spheric.ori.xml\""}
? (36) referential [0, 11]
-->{"name": "image", "sensor": 11, "description": "origin: top left corner of top left pixel, +XY: raster pixel coordinates, +Z: inverse depth (measured along the optical axis). Imported from \"spheric.ori.xml\""}
Starting new HTTP connection (1): localhost
http://localhost:5000 "GET /referentials/ HTTP/1.1" 200 14451
<--{"srid": null, "id": 37, "name": "image", "sensor": 11, "description": "origin: top left corner of top left pixel, +XY: raster pixel coordinates, +Z: inverse depth (measured along the optical axis). Imported from \"spheric.ori.xml\""}
? (37) referential [image, 11]
-->{"name": "spheric.ori.xml#projection", "tdate": "None", "source": 36, "description": "Imported from \"spheric.ori.xml\"", "target": 37, "parameters": {"ppa": [960.0, 960.0], "phi": [-1.570796326795, 1.570796326795], "lambda": [-3.14159265359, 3.14159265359]}, "transfo_type": 9}
Starting new HTTP connection (1): localhost
http://localhost:5000 "GET /transfos/ HTTP/1.1" 200 29150
Starting new HTTP connection (1): localhost
http://localhost:5000 "POST /transfos/ HTTP/1.1" 404 206
Adding object failed (status code: 404)
I think the problem is related to spheric.ori.xml no including a calibration_date.
It works if I use --calibration
on the command line:
mm2li --verbose import-orimatis -u http://localhost:5000 -k aaaabbbbcccc data/spheric.ori.xml --calibration $(date -Iseconds)
(It just works the first time, but that's a different problem.)
Ok. Is the issue having micmac_li3ds
send a transfo with tdate: None
instead of without a tdate
or is it api-li3ds
mis-managing a transfo with no tdate
?
It would work if micmac_li3ds
sent a transfo with no tdate
.
A related issue: if no sensor name is provided on the command line then a sensor named "None" will be created. Is that expected? That does not make much sense to me.
I am seeing an error while importing data/spheric.ori.xml using the test.sh script.
Not sure what the issue is right now.