skip to Main Content

How to solve "TypeError: list indices must be integers or slices, not str" – Artificial Intelligence

I have 2 files to copy from a folder to another folder and these are my codes: import shutil src = '/Users/cadellteng/Desktop/Program Booklet/' dst = '/Users/cadellteng/Desktop/Python/' file = ['AI+Product+Manager+Nanodegree+Program+Syllabus.pdf','Artificial+Intelligence+with+Python+Nanodegree+Syllabus+9-5.pdf'] for i in file: shutil.copyfile(src+file[i], dst+file[i]) When I tried to run…

VIEW QUESTION

Celery not executing new tasks if redis lost connection is restablished

I have a Celery worker configured to connect to redis as follows: celery_app_site24x7 = Celery('monitoringExterne.celerys.site24x7', broker=settings.REDIS['broker'], backend=settings.REDIS['backend']) celery_app_site24x7.conf.broker_transport_options = { 'visibility_timeout': 36000 } celery_app_site24x7.conf.socket_timeout = 300 celery_app_site24x7.conf.broker_connection_max_retries = None celery_app_site24x7.config_from_object('django.conf:settings') celery_app_site24x7.autodiscover_tasks(lambda: settings.INSTALLED_APPS) The issue is that if Redis is down…

VIEW QUESTION
Back To Top
Search