amazon-connect / amazon-connect-salesforce-lambda

Apache License 2.0
45 stars 34 forks source link

sfGenerateAudioRecordingStreamingURL.py error. #31

Closed juaestiv closed 2 years ago

juaestiv commented 3 years ago

Line 73 of this function has a line feed breaks the code. An IndentationError is triggered

blee-amzn commented 3 years ago

That line of code has existed in the app for over a year ๐Ÿ˜› I just tried running the code on my machine and it worked.

How did you deploy the lambdas? Did you modify them at any point in the deployment process? Did you modify any configuration?

juaestiv commented 3 years ago

Hi: I have modify nothing. Is not needed to deploy it to see the bug. Just go to the repo amazon-connect-salesforce-lambda/sfGenerateAudioRecordingStreamingURL.py at master ยท amazon-connect/amazon-connect-salesforce-lambda (github.com) https://github.com/amazon-connect/amazon-connect-salesforce-lambda/blob/master/sam-app/lambda_functions/sfGenerateAudioRecordingStreamingURL.py

Go to line 73 and you will see the bug. According to github this file has been modified 27days ago. Probably you have make the deployment in you existing environment and the lambda hasn't been replaced. Every deployment from scratch will fail. Line 72 should be signed_url = cloudfront_signer.generate_presigned_url(url, date_less_than=expire_date) But is broken in two lines that will produce an identation file.

On Tue, Aug 24, 2021 at 3:35 PM blee-amzn @.***> wrote:

That line of code has existed in the app for over a year ๐Ÿ˜› I just tried running the code on my machine and it worked.

How did you deploy the lambdas? Did you modify them at any point in the deployment process? Did you modify any configuration?

โ€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amazon-connect/amazon-connect-salesforce-lambda/issues/31#issuecomment-904648416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQNI5JK6IO2Z4655TSMPKLDT6ON2FANCNFSM5CWUF7AA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

blee-amzn commented 2 years ago

This github repo is just a public repo, that line of code in our internal repo hasn't been changed for over a year. That line break + indentation is perfectly valid mid arg: see here in the python style guide.

yiming-amzn commented 2 years ago

Closing this ticket as we have not heard back from you. Please create a new issue if you have any other questions that we can help. Thanks!