question

Upvotes
Accepted
20 0 0 2

RDP News Messages, Cloud credentials expired error

Hi all,

I'm running RDP News Messages (option -h or -s) with the Python script downloaded from Refinitiv site, together with RDP Token and sqsQueue.

Token seems fine and permissioned on news:

"scope": "trapi.alerts.news-headlines.crud trapi.alerts.news-stories.crud trapi.alerts.news.crud trapi.data.news-story-viewer.read trapi.data.news.read"


The problem is that I get the error at every news subscription (headers or stories it's the same):

Polling messages from queue...

Cloud credentials exprired!

...

Do you have any suggestion or idea ?


Many thanks and best regards

Alessandro



rdp-apinews#technologyrdpcredentialscloud
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
24.9k 87 10 22

I thought I would add some additional information on this issue - in case it helps others with a similar issue.

The error - "Cloud credentials exprired!" - displayed by the example can be misleading. It is a catch-all exception handler invoked when the call to sqsQueue.startPolling() in the newsMessages.py fails.

In my case, I had changed the region from the default 'us-east-1' which caused an issue. Adding additional exception handling around the sqs.receive_message call in sqsQueue.py yielded a more helpful 'An error occurred (AWS.SimpleQueueService.NonExistentQueue) when calling the ReceiveMessage operation: The specified queue does not exist for this wsdl version'

I have reported the above to the relevant people and hopefully, the example code will be updated in the near future.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
31.9k 38 11 19

Hello @alessandro.bonizzoni1 ,

A quick disclaimer, if the core of the issue is with your assigned RDP permissions, you will need to contact Permissions team for help verify the permissions, we will not be able to help.

If the issue is at the programmatic integration level, I can try to suggest:

I believe the best way to investigate is via a python IDE where you can run example step by step, for example VSCode.

The suspected issue looks to be within startNewsMessages, between getCloudCredentials and startPolling:

sqs.gif

I would breakpoint at getCloundCredentials, to verify if you are obtaining the cloud creds and that the cloud creds obtained as well as params look valid, before they you fail to startPolling.

Let us know if this suggestion helps, how this works on your side


sqs.gif (63.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks a lot,

it seems solved, actually I was using in sqsQueue.py

sqs = session.client('sqs', use_ssl=False, verify=False)

in order to avoid an SSL CERT VERIFY error appearing with Python 3.10.

Now I've reinstalled Python 3.11 and it works using the "official"

sqs = session.client('sqs')

without the Cloud expire error


Thanks the same for your help !

Best regards

Alessandro