Aws::MTurk::Errors::RequestError: The HIT with ID … already exists
Amazon Mechanical Turk gives me the following error when I invoke a call to CreateHITWithHITType
using the Ruby SDK:
Aws::MTurk::Errors::RequestError: The HIT with ID "3HJ..." already exists. (154...)
I don't understand why I am getting this error.
It seems I'm getting this error because I am calling CreateHITWithHITType
with a unique request token, which I have used in the past -- when I omit the token or use a token which has never been used before, my code creates the HIT successfully. However, this is confusing to me because it has been over 24 hours (closer to 30 days) since I last used that unique request token, and according to the Amazon Mechanical Turk documentation for CreateHITWithHITType
(and the relevant Ruby SDK documentation), unique request tokens expire after 24 hours:
UniqueRequestToken: A unique identifier for this request. Allows you to retry the call on
error without creating duplicate HITs. This is useful in cases such as
network timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a previous
call using the same UniqueRequestToken, subsequent calls will return a
AWS.MechanicalTurk.HitAlreadyExists
error with a message containing
the HITId.
Type: String
Constraints: must not be longer than 64 characters in length. It is
your responsibility to ensure uniqueness of the token. The unique
token expires after 24 hours. Subsequent calls using the same
UniqueRequestToken made after the 24 hour limit could create duplicate
HITs.
Is the documentation incorrect? Or is there something I misunderstand about unique request tokens?
amazon-web-services mechanicalturk
add a comment |
Amazon Mechanical Turk gives me the following error when I invoke a call to CreateHITWithHITType
using the Ruby SDK:
Aws::MTurk::Errors::RequestError: The HIT with ID "3HJ..." already exists. (154...)
I don't understand why I am getting this error.
It seems I'm getting this error because I am calling CreateHITWithHITType
with a unique request token, which I have used in the past -- when I omit the token or use a token which has never been used before, my code creates the HIT successfully. However, this is confusing to me because it has been over 24 hours (closer to 30 days) since I last used that unique request token, and according to the Amazon Mechanical Turk documentation for CreateHITWithHITType
(and the relevant Ruby SDK documentation), unique request tokens expire after 24 hours:
UniqueRequestToken: A unique identifier for this request. Allows you to retry the call on
error without creating duplicate HITs. This is useful in cases such as
network timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a previous
call using the same UniqueRequestToken, subsequent calls will return a
AWS.MechanicalTurk.HitAlreadyExists
error with a message containing
the HITId.
Type: String
Constraints: must not be longer than 64 characters in length. It is
your responsibility to ensure uniqueness of the token. The unique
token expires after 24 hours. Subsequent calls using the same
UniqueRequestToken made after the 24 hour limit could create duplicate
HITs.
Is the documentation incorrect? Or is there something I misunderstand about unique request tokens?
amazon-web-services mechanicalturk
add a comment |
Amazon Mechanical Turk gives me the following error when I invoke a call to CreateHITWithHITType
using the Ruby SDK:
Aws::MTurk::Errors::RequestError: The HIT with ID "3HJ..." already exists. (154...)
I don't understand why I am getting this error.
It seems I'm getting this error because I am calling CreateHITWithHITType
with a unique request token, which I have used in the past -- when I omit the token or use a token which has never been used before, my code creates the HIT successfully. However, this is confusing to me because it has been over 24 hours (closer to 30 days) since I last used that unique request token, and according to the Amazon Mechanical Turk documentation for CreateHITWithHITType
(and the relevant Ruby SDK documentation), unique request tokens expire after 24 hours:
UniqueRequestToken: A unique identifier for this request. Allows you to retry the call on
error without creating duplicate HITs. This is useful in cases such as
network timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a previous
call using the same UniqueRequestToken, subsequent calls will return a
AWS.MechanicalTurk.HitAlreadyExists
error with a message containing
the HITId.
Type: String
Constraints: must not be longer than 64 characters in length. It is
your responsibility to ensure uniqueness of the token. The unique
token expires after 24 hours. Subsequent calls using the same
UniqueRequestToken made after the 24 hour limit could create duplicate
HITs.
Is the documentation incorrect? Or is there something I misunderstand about unique request tokens?
amazon-web-services mechanicalturk
Amazon Mechanical Turk gives me the following error when I invoke a call to CreateHITWithHITType
using the Ruby SDK:
Aws::MTurk::Errors::RequestError: The HIT with ID "3HJ..." already exists. (154...)
I don't understand why I am getting this error.
It seems I'm getting this error because I am calling CreateHITWithHITType
with a unique request token, which I have used in the past -- when I omit the token or use a token which has never been used before, my code creates the HIT successfully. However, this is confusing to me because it has been over 24 hours (closer to 30 days) since I last used that unique request token, and according to the Amazon Mechanical Turk documentation for CreateHITWithHITType
(and the relevant Ruby SDK documentation), unique request tokens expire after 24 hours:
UniqueRequestToken: A unique identifier for this request. Allows you to retry the call on
error without creating duplicate HITs. This is useful in cases such as
network timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a previous
call using the same UniqueRequestToken, subsequent calls will return a
AWS.MechanicalTurk.HitAlreadyExists
error with a message containing
the HITId.
Type: String
Constraints: must not be longer than 64 characters in length. It is
your responsibility to ensure uniqueness of the token. The unique
token expires after 24 hours. Subsequent calls using the same
UniqueRequestToken made after the 24 hour limit could create duplicate
HITs.
Is the documentation incorrect? Or is there something I misunderstand about unique request tokens?
amazon-web-services mechanicalturk
amazon-web-services mechanicalturk
asked Jan 2 at 22:47
Ceasar BautistaCeasar Bautista
8,81494362
8,81494362
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014168%2fawsmturkerrorsrequesterror-the-hit-with-id-already-exists%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014168%2fawsmturkerrorsrequesterror-the-hit-with-id-already-exists%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown