Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object
django-storages has been updated that's why you are getting this error. OLD SYNTAX from storages.backends.s3boto3 import S3Boto3Storage import os class MediaStorage(S3Boto3Storage): bucket_name = os.environ.get('AWS_STORAGE_BUCKET_NAME') location = 'media' class StaticStorage(S3Boto3Storage): bucket_name = os.environ.get('AWS_STORAGE_BUCKET_NAME') location = 'static' UPDATED SYNTAX STORAGES = { "default": { "BACKEND": "storages.backends.s3.S3Storage", "OPTIONS": { "bucket_name": AWS_STORAGE_BUCKET_NAME, "location": 'media' }, }, "staticfiles": { "BACKEND": "storages.backends.s3.S3Storage", "OPTIONS": { "bucket_name": AWS_STORAGE_BUCKET_NAME, "location": 'static' }, }, } On Monday, December 14, 2020 at 2:10:32 PM UTC+5:30 KUMBHAGIRI SIVAKRISHNA wrote: > ile > "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", > > line 200, in validate_bucket_name > if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): > TypeError: expected string or bytes-like object > > > Please help me to solve this problem > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/561c9981-ae62-4a88-90ac-4704968e1ad2n%40googlegroups.com.
Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object
On 14/12/2020 09.38, KUMBHAGIRI SIVAKRISHNA wrote: ile "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", line 200, in validate_bucket_name if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object Please help me to solve this problem https://stackoverflow.com/help/how-to-ask -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/886570b2-6eee-45ef-83a3-16a8cc939e12%40stacktrace.dk.
if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object
ile "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", line 200, in validate_bucket_name if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object Please help me to solve this problem -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMM5N90eXxofy6AOG54bC%2B_qN1-UcECOR6tKZYdzhhPrgmSecg%40mail.gmail.com.