python - Django MissingFileError: Path is a directory -


i'm trying deploy project static files on s3 aws when collectstatic on terminal, got error. heard looks i'm trying include static asset in template, have specified directory instead of file... , not understand :/

traceback (most recent call last): file "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) file "/home/damian/proj1/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__ return self.application(environ, start_response) file "/home/damian/proj1/local/lib/python2.7/site-packages/whitenoise/base.py", line 57, in __call__ static_file = self.find_file(environ['path_info']) file "/home/damian/proj1/local/lib/python2.7/site-packages/whitenoise/django.py", line 75, in find_file return self.get_static_file(path, url) file "/home/damian/proj1/local/lib/python2.7/site-packages/whitenoise/base.py", line 111, in get_static_file self.add_stat_headers(headers, path, url) file "/home/damian/proj1/local/lib/python2.7/site-packages/whitenoise/base.py", line 121, in add_stat_headers file_stat = stat_regular_file(path) file "/home/damian/proj1/local/lib/python2.7/site-packages/whitenoise/utils.py", line 30, in stat_regular_file raise missingfileerror('path directory: {0}'.format(path)) missingfileerror: path directory: /home/damian/proj1/blog/static_in_pro/our_static [08/aug/2016 13:14:21] "get / http/1.1" 500 59 

my (not all) settings:

static_url = '/static/'  static_root = os.path.join(base_dir, "static_in_env", "static_root")  staticfiles_dirs = ( os.path.join(base_dir, "static_in_pro", "our_static"), #'/var/www/static/', )  media_url = '/media/'  media_root = os.path.join(base_dir, "static_in_env", "media_root")  crispy_template_pack = 'bootstrap3'  mediafiles_dirs = (media_root)   #aws s3 statick files  aws_headers = {  # see     http://developer.yahoo.com/performance/rules.html#expires     'expires': 'thu, 31 dec 2099 20:00:00 gmt',     'cache-control': 'max-age=94608000', }  aws_storage_bucket_name = '###' aws_access_key_id = '###' aws_secret_access_key = '###'   aws_s3_custom_domain = '%s.s3.amazonaws.com' % aws_storage_bucket_name  static_url = "https://%s/" % aws_s3_custom_domain  staticfiles_storage = 'storages.backends.s3boto.s3botostorage' 

thanks , indicate correct path ongoing work! cheers

that error whitenoise, don't need use whitenoise if you're serving static files s3. should remove whitenoise references wsgi.py file.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -