{"action":"opened","issue":{"url":"https://api.github.com/repos/heroku/heroku-buildpack-python/issues/351","repository_url":"https://api.github.com/repos/heroku/heroku-buildpack-python","labels_url":"https://api.github.com/repos/heroku/heroku-buildpack-python/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku-buildpack-python/issues/351/comments","events_url":"https://api.github.com/repos/heroku/heroku-buildpack-python/issues/351/events","html_url":"https://github.com/heroku/heroku-buildpack-python/issues/351","id":197096651,"number":351,"title":"collectstatic fails with latest buildpack (v96) but works with v83","user":{"login":"fomojola","id":264253,"avatar_url":"https://avatars.githubusercontent.com/u/264253?v=3","gravatar_id":"","url":"https://api.github.com/users/fomojola","html_url":"https://github.com/fomojola","followers_url":"https://api.github.com/users/fomojola/followers","following_url":"https://api.github.com/users/fomojola/following{/other_user}","gists_url":"https://api.github.com/users/fomojola/gists{/gist_id}","starred_url":"https://api.github.com/users/fomojola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fomojola/subscriptions","organizations_url":"https://api.github.com/users/fomojola/orgs","repos_url":"https://api.github.com/users/fomojola/repos","events_url":"https://api.github.com/users/fomojola/events{/privacy}","received_events_url":"https://api.github.com/users/fomojola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-22T05:18:42Z","updated_at":"2016-12-22T05:18:42Z","closed_at":null,"body":"Recently pushed a new version of my Django app, and experienced the following error:\r\n\r\n```\r\nremote:      $ python manage.py collectstatic --noinput\r\nremote:        Traceback (most recent call last):\r\nremote:          File \"manage.py\", line 36, in <module>\r\nremote:            execute_from_command_line(sys.argv)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\nremote:            utility.execute()\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py\", line 377, in execute\r\nremote:            self.fetch_command(subcommand).run_from_argv(self.argv)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\nremote:            self.execute(*args, **options.__dict__)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\nremote:            output = self.handle(*args, **options)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py\", line 533, in handle\r\nremote:            return self.handle_noargs(**options)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 168, in handle_noargs\r\nremote:            collected = self.collect()\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 98, in collect\r\nremote:            for path, storage in finder.list(self.ignore_patterns):\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/contrib/staticfiles/finders.py\", line 111, in list\r\nremote:            for path in utils.get_files(storage, ignore_patterns):\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/contrib/staticfiles/utils.py\", line 27, in get_files\r\nremote:            directories, files = storage.listdir(location)\r\nremote:          File \"/app/.heroku/python/lib/python2.7/site-packages/django/core/files/storage.py\", line 270, in listdir\r\nremote:            for entry in os.listdir(path):\r\nremote:        OSError: [Errno 2] No such file or directory: '/app/appname/static'\r\n```\r\n\r\nGiven I hadn't made any major changes in the app was quite surprised: this worked the last time I pushed it (November 7th). After some editing got it to stop making the error, but suddenly started seeing errors that collectstatic wasn't generating the actual output files (my app's slug size dipped from 100M to 78M). After some additional futzing around I got this fixed by forcing the buildpack version to match the last version I successfully pushed with using \r\n\r\n`heroku buildpacks:set https://github.com/heroku/heroku-buildpack-python#v83`\r\n\r\nLooking at https://github.com/heroku/heroku-buildpack-python/compare/v83...v96 it appears that the BUILD_DIR is no longer set to /app (hence the above error). Previously my STATICFILES_DIR setting was this:\r\n\r\n```\r\nSTATICFILES_DIRS = (\r\n    os.path.join(APPPATH, 'appname/static'),\r\n)\r\n```\r\n\r\nWhat should I use to properly comply with the requirements of v96 and later?"}}
{"actor":{"display_login":"fomojola"}}