Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsk_perception] Catch exception when dynamodb doesn't have entry that matches FaceID #2780

Closed

Conversation

tkmtnt7000
Copy link
Member

@tkmtnt7000 tkmtnt7000 commented Jul 6, 2023

This PR avoids the following error.
This error occurs when dynamodb entry of face images does not exists for some reasons such as mistakenly deleting it.

...
[INFO] [1688613945.445521] [/aws_auto_checkin_app]: [[{'Similarity': 96.03959655761719, 'Face': {'FaceId': '2411ca49-43cf-4495-8da6-0e0f9212f1c8', 'BoundingBox': {'Width': 0.1941870003938675, 'Height': 0.3191249966621399, 'Left': 0.4040130078792572, 'Top': 0.25807899236679077}, 'ImageId': '532947df-2b6c-37cd-9b13-68a14501cbdf', 'Confidence': 99.99559783935547}}]]
[ERROR] [1688613945.560723] [/aws_auto_checkin_app]: [bad callback: <bound method Subscriber.callback of <message_filters.Subscriber object at 0x7f09d96fe280>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 76, in callback
    self.signalMessage(msg)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 330, in add
    self.signalMessage(*msgs)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/home/tsukamoto/ros/robot_ws/src/jsk_recognition/jsk_perception/node_scripts/aws_auto_checkin_app.py", line 194, in callback
    face_id = self.dynamodb_table.get_item(
KeyError: 'Item'
]

@mqcmd196
Copy link
Member

mqcmd196 commented Jul 6, 2023

@tkmtnt7000 Sorry, the PR title of #2766 is quite confusing but it tries to solve same trouble

@tkmtnt7000
Copy link
Member Author

Oh, thank you. Move to #2766.

@k-okada
Copy link
Member

k-okada commented Nov 10, 2023

closed via @mqcmd196 's commit #2766

@k-okada k-okada closed this Nov 10, 2023
@tkmtnt7000 tkmtnt7000 deleted the PR-fix-aws-dynamodb-search branch November 10, 2023 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants