This topic provides answers to the frequently asked questions (FAQ) about error messages that are returned after Content Moderation operations are called.

For more information about the Content Moderation API, see FAQ about the Content Moderation API.

Why is the following error message returned when I call a Content Moderation operation: You have not opened Yundun Content Moderation Service?

Cause: Content Moderation is not activated.

Solution: Go to the activation page of Content Moderation to activate the service. Then, call the Content Moderation operation again.

Why is the following error message returned when I call a Content Moderation operation on an Elastic Compute Service (ECS) instance after the operation is called on my computer: SDK.ServerUnreachable: Speicified endpoint or uri is not valid?

Cause: The ECS instance cannot be accessed over the Internet. However, a Content Moderation operation must be called over the Internet.

Solution: Enable access to the ECS instance over the Internet. Check network connection by sending PING messages to the endpoint of the corresponding environment. If the network connection is normal, check whether the dependencies in a corresponding language are installed or the version of the aliyun-**-sdk-core library is as required. We recommend that you use the sample code provided in the SDK documentation to call Content Moderation operations.

For more information, see SDK overview.

Why is the following message returned when I use Content Moderation SDKs to call a Content Moderation operation on an ECS instance: SDK.ServerUnreachable : SocketTimeoutException has occurred on a socket read or accept?

Cause: A network access error occurred. A Content Moderation operation must be called over the Internet.

Solution: Enable access to the ECS instance over the Internet. To check network connection, you can send PING messages to the endpoint of the corresponding environment. If the network connection is normal, check whether the dependencies in a corresponding language are installed or the version of the aliyun-**-sdk-core library is as required. We recommend that you use the sample code provided in the SDK documentation to call Content Moderation operations.

For more information, see SDK overview.

Why am I prompted with the following message when I call a Content Moderation operation: algo failed(ocridcard-modelnotexist)?

Cause: The optical character recognition (OCR) card model cannot be used in the region that corresponds to the current endpoint.

Solution: Select the endpoint of a region where the OCR card model can be used.

For more information, see Endpoints.

Why am I prompted with the following message when I call a Content Moderation operation: Your using subaccount is not authorized, please refer to the page?

Cause: The RAM user is not authorized to call Content Moderation operations.

Solution: You can call a Content Moderation operation as a RAM user. Before that, you must create a RAM user and authorize the RAM user to call Content Moderation operations.

For more information, see Call the Content Moderation API as a RAM user.

Why is the 401 (NOT_ALLOWED) error code returned when I call a Content Moderation operation?

Cause: The image, video URL that you use is not secure.

Solution: Check whether your URL is secure or whether your IP address belongs to the following internal CIDR blocks. You must use a public IP address to access Content Moderation.
  • 10.0.0.0/8
  • 11.0.0.0/8
  • 100.64.0.0/10
  • 172.16.0.0/12
  • 192.168.0.0/16
  • 127.0.0.1/32
  • 33.0.0.0/8

Why is the 400 (BAD_REQUEST) error code returned when I call a Content Moderation operation?

Cause: A request parameter is invalid. If the [task.url] is bad format error message is returned, the URL is invalid.

Solution: We recommend that you check whether the request parameters of the Content Moderation operation are specified as required. If you are prompted with a message that indicates an invalid URL, check the URL. If you can open the URL in a browser, check whether the URL contains special characters. If the URL contains special characters, encode the special characters.

For more information, see Common parameters.

Why is the 594 (EXPIRED) error code returned when I call a Content Moderation operation?

Cause: The task ID expired. For example, you can call an operation to query the moderation results of an asynchronous task of image moderation within 24 hours after the task is run. After 24 hours, the EXPIRED message is returned.

Solution: After you submit the asynchronous task of image moderation, we recommend that you set the interval for querying moderation results to 30 seconds. This ensures that the task ID does not expire.

Why is the 596 (PERMISSION_DENY) error code returned when I call a Content Moderation operation?

Cause: Content Moderation is not activated, or the account has no permissions, is disabled, or has an overdue payment. For more information, see the returned error message.

Solution: Check whether the account that you use to call the Content Moderation operation has permissions or has an overdue payment. If you call a Content Moderation operation as a RAM user, you must grant permissions to the RAM user. If you have not activated Content Moderation, log on to the activation page of Content Moderation to activate the service.

For more information, see Call the Content Moderation API as a RAM user.

Why is the AlgorithmTimeOut error returned or the detected text in the image incomplete when I call a synchronous OCR operation?

Cause: The AlgorithmTimeOut error indicates a moderation timeout. Image OCR is time-consuming. The default timeout period for a synchronous operation is 3 seconds. If you call a synchronous OCR operation to detect a large amount of text in an image, a timeout error is very likely to occur.

Solution: If your business requires you to process images that contain a large amount of text, we recommend that you call the /green/image/asyncscan operation. This way, Content Moderation retries the OCR operation multiple times and optimizes the OCR process to avoid a timeout error.

Why is the 592 (DOWNLOAD_TIMEOUT) error code returned when I call a Content Moderation operation?

Cause: The download timed out. The download duration is limited to 3 seconds. The size of the content to be moderated must be allowed by the Content Moderation operation.

Solution: We recommend that you check whether the image URL is accessible or whether the image can be downloaded within 3 seconds. If an Alibaba Cloud CDN (CDN) domain is used, the download timeout may be caused due to the communication between CDN and the origin server. Therefore, we recommend that you do not use a CDN domain. If you access services across regions, a timeout error is very likely to occur. For example, you want to access an Object Storage Service (OSS) bucket in the US (Silicon Valley) region from the Singapore (Singapore) region. We recommend that you access an OSS bucket in the same region.

Why is the "[task.dataId] is too long(>256)" error message returned when I call a text moderation operation?

Cause: The data ID exceeded 128 characters in length. A data ID uniquely identifies business data. A data ID can contain letters, digits, underscores (_), hyphens (-), and periods (.).Data ID example: cfd33235-71a4-468b-8137-a5ffe323a7e8.

Solution: Specify the dataId parameter in the API request based on the API reference.

For more information, see Text Synchronous moderation.

Why is the "Status Code: 400" signature error returned when I send HTTP requests to call operations?

Cause: The signature mechanism for HTTP requests is complex. If you construct a signature on your own, code errors are likely to occur.

Solution: We recommend that you use Content Moderation SDKs. The signature process is encapsulated in the SDKs, and you do not need to write the code for signature. If you can call operations only by using HTTP requests, we recommend that you first understand the signature mechanism of Content Moderation.

For more information, see SDK overview and Signature method.

Why is the 480 (DOWNLOAD_FAILED) error code returned when I call a Content Moderation operation?

Cause: The download failed. This may be because the URL of the object to be moderated is inaccessible or the content to be moderated cannot be downloaded. This may also be because the size or resolution of the content to be moderated exceeds the upper limit.

Solution: If the object is an image, we recommend that you check whether the image URL is accessible. If the object is a video, specific images in the sequence of captured frames may fail to be downloaded. In this case, we recommend that you check whether frame-related parameters, such as the time parameter, are valid. If the object is a video stream, we recommend that you check whether the video stream is being pushed during the moderation. You can also submit an OSS ticket to troubleshoot the error.

Why is the 480 error code always returned for specific URLs when I call an operation to synchronously moderate videos?

Cause: The download failed. This may be because the URL of the object to be moderated is inaccessible or the content to be moderated cannot be downloaded. This may also be because the size or resolution of the content to be moderated exceeds the upper limit.

Solution: If the object is a video, specific images in the sequence of captured frames may fail to be downloaded. In this case, we recommend that you check whether frame-related parameters, such as the time parameter, are valid. You can also submit an OSS ticket to troubleshoot the error.

For more information, see Video snapshots.

Why is the 480 (GIF_TOO_MUCH_PIXELS) error code returned when I call an operation to moderate images?

Cause: The download failed. The GIF_TOO_MUCH_PIXELS error message indicates that the size or resolution of the content to be moderated exceeds the upper limit.

Solution: Content Moderation can moderate an image of which the size does not exceed 20 MB, the height or width does not exceed 30,000 pixels, and the total resolution does not exceed 0.25 billion pixels. If the size or resolution of an image to be moderated exceeds the upper limit, compress the image and then submit it for moderation.

For more information, see Synchronous moderation.

Why is the 480 (Input/output error) error code returned when I call an operation to moderate video live streams?

Cause: The download failed. In general, the Input/output error error message is returned because an error occurred in media streaming files. To be specific, the error message is returned because the URL of the content to be moderated is inaccessible or the content cannot be downloaded.

Solution: If the object is a video stream, we recommend that you check whether the video stream is being pushed and whether the live streaming is stopped. If the object is a video, specific images in the sequence of captured frames may fail to be downloaded. In this case, we recommend that you check whether frame-related parameters, such as the time parameter, are valid.

Why is the 500 (GENERAL_ERROR) error code returned when I call a Content Moderation operation?

Cause: A temporary error occurred on the server. Troubleshoot the error based on the returned error message.

Solution: If the error code is occasionally returned, try again. If the error code is continuously returned, submit a ticket and provide the returned error information to help technical engineers troubleshoot the error at the earliest opportunity.

Why is the 500 (service interrupted) error code returned when I use Content Moderation SDKs?

Cause: A temporary error occurred on the server. The service interrupted error message may be returned because your SDK version is incompatible with the server version.

Solution: We recommend that you check whether the latest SDK version is used. If the SDK version is not the latest, update the SDK.

For more information, see Installation.

Why is the 586 (ALGO_FAILED) error code returned when I call a Content Moderation operation?

Cause: An error occurred in the algorithm service. In general, the error code is returned because a timeout error occurred due to the network jitter of the algorithm service.

Solution: If the error code is occasionally returned, try again. If this error code is continuously returned, submit a ticket and provide the returned error information to help technical engineers troubleshoot the error at the earliest opportunity.

Why is the 586 error code returned when I call a Content Moderation operation to moderate images?

Cause: An error occurred in the algorithm service. If the error code is returned only for specific images or videos, a codec failure may occur.

Solution: We recommend that you check whether image or video files are damaged. Alternatively, you can use a codec to test whether images or videos are normally encoded or decoded. The following image formats are supported: PNG, JPG, JPEG, BMP, GIF, and WEBP.

For more information, see Synchronous moderation.

Why is the 588 (EXCEED_QUOTA) error code returned when I call a Content Moderation operation?

Cause: The number of moderation requests per second exceeded the concurrency limit. By default, a maximum of 50 images, 20 videos entries, or 100 text entries can be concurrently moderated per second.

Solution: We recommend that you reduce the number of moderation requests per second and queue the content to be moderated. Alternatively, you can contact your customer manager to raise the concurrency limit based on your concurrency requirements during peak hours.

Why is the "InvalidTimeStamp.Expired" error message returned when I call a Content Moderation operation?

Cause: The timestamp for calling the operation expired. This error message is returned because the offset between the timestamps on the client and server exceeds 15 minutes.

Solution: Check whether the server time is recently adjusted or whether the time zone on the client is the same as that on the server.

For more information, see Common parameters.

Why is an error reported when I use the human review feature in the Content Moderation console after the console is idle for a long period?

Cause: This is a console access error. It may be caused due to different reasons. For example, it may be caused because the access authorization failed due to an invalid logon session. Solution: If the Request ID error is returned,

we recommend that you refresh your browser and log on to the console again. If an error is continuously reported after a successful logon, submit a ticket and provide the error information or error screenshots. This helps technical engineers troubleshoot the error at the earliest opportunity.

Why is a string that contains HTML code tags moderated but no data returned when I use Content Moderation SDKs to moderate text?

Cause: If the string to be moderated contains code tags such as HTML code tags, the firewall determines that the string contains risky code and blocks your network request. As a result, no response is returned for the request.

Solution: We recommend that you filter out code tags such as the characters that contain HTML code or SQL code in text before you moderate the text. This prevents the text from being blocked by the firewall.

For more information, see Text Synchronous moderation.

Why is the following error message returned when I call an OCR operation for content moderation before 09:00 in the morning and after 21:00 at night: Specified time stamp or date value is expired?

Cause: The timestamp for calling the operation expired. This error message is returned because the offset between the timestamps on the client and server exceeds 15 minutes.

Solution: We recommend that you use the SDKs provided by the Alibaba Cloud official website to call the operation. Content Moderation supports SDKs for different programming languages such as Java, Python, and PHP. If you can use only HTTP requests to call the operation, check whether the server time is recently adjusted or whether the time zone on the client is the same as that on the server.

For more information, see Common parameters.

Why is the 406 error code returned when I call a Content Moderation operation?

Cause: This may be because the used and referenced SDK versions are not the same. For example, you use the code of a later SDK version to call operations but reference an earlier SDK version.

Solution: We recommend that you check whether the referenced SDK version is the latest. If you use Content Moderation SDK for Java, update the referenced core and green packages to the latest version. Content Moderation supports SDKs for different programming languages such as Java, Python, and PHP.

For more information, see SDK overview.

Why is the following error message returned when I call an operation to manage the configurations of custom text libraries: The API is invalid?

Cause: The operation that is used to manage the configurations of custom text libraries can be called only in the China (Shanghai) region. You cannot call this operation in another region such as the China (Beijing) region. You can call this operation to query the text libraries of a specific region. If no text library is created in the specific region, no data is returned after you call this operation.

Solution: Call the operation that is used to manage the configurations of custom text libraries in the China (Shanghai) region.

For more information, see Create a text library.

Why is the UnicodeEncodeError error returned when I run Content Moderation SDK for Python in Jupyter Notebook or by using a command-line tool?

Cause: An error occurred in the integrated development environment (IDE).

Solution: We recommend that you run Content Moderation SDK for Python in a mainstream IDE such as PyCharm. The IDE error occurred in the specific IDE is unknown. We recommend that you check the IDE to troubleshoot the error.