Reputation: 1739
I am using awsretry
module on my windows
machine to try and alter the number of retries/API query request rate to my aws
services.
Below is my code which is pretty straightforward.
import boto3
from awsretry import AWSRetry
@AWSRetry.backoff()
def create_service():
client = boto3.client('sagemaker')
for i in range(200):
print(client.list_notebook_instances())
create_service()
I am getting the below error.
from awsretry import AWSRetry
File "C:\Users\AppData\Local\Programs\Python\Python37-
32\lib\site-packages\awsretry\__init__.py", line 7, in <module>
import syslog
ModuleNotFoundError: No module named 'syslog'
How do I resolve this? Looks like awsretry
internally has dependency on syslog
module. I tried installing this via pip, but in vain.
Upvotes: 2
Views: 4095
Reputation: 1739
Posting this as it would be good to know
Just went through the GitHub
link of awsretry and they have fixed this issue by replacing
syslog
with logging
. Syslog requires Linux.
import syslog # Removed
import logging # Added
Below is the link for the fix
https://github.com/jhart-r7/awsretry/commit/ddd98a2797b8ef1f6d6311edfc71e2b7fc631877
If you have the code, you may replace syslog
occurences with logging
line in __init__.py
Upvotes: 3