[Solved]-Django celery 4 – ValueError: invalid literal for int() with base 10 when start celery worker

12πŸ‘

βœ…

I encountered the same problem, and resolved it.

First check (it’s very likely) that your AWS access key ID or secret key contains β€˜xi/’ somewhere, and that you have:

BROKER_URL = "sqs://%s:%s@" % (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)

If so, then your problem is in URL unsafe keys, and the fix is:

BROKER_URL = 'sqs://{0}:{1}@'.format(
    urllib.parse.quote(AWS_ACCESS_KEY_ID, safe=''),
    urllib.parse.quote(AWS_SECRET_ACCESS_KEY, safe='')
)

Note: Use urllib.quote if using Python 2.x

πŸ‘€Shaan

Leave a comment