heroku运行python manage.py collectstatic

heroku运行python manage.py collectstatic,python,django,heroku,static,django-staticfiles,Python,Django,Heroku,Static,Django Staticfiles,运行此命令时,出现以下错误: $ heroku run python manage.py collectstatic Running python manage.py collectstatic on myapp... up, run.1771 You have requested to collect static files at the destination location as specified in your settings: /app/static_in_env

运行此命令时,出现以下错误:

$ heroku run python manage.py collectstatic 

Running python manage.py collectstatic on myapp... up, run.1771
You have requested to collect static files at the destination location as specified in your settings:

    /app/static_in_env/static_root

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: 

$ yes

OSError: [Errno 2] No such file or directory: '/app/my app/static_in_pro/our_static'
我如何解决这个问题

我的静态文件设置

# Static asset configuration 
STATIC_URL = '/static/'
STATIC_ROOT=os.path.join(os.path.dirname(BASE_DIR),"static_in_env","static_root")
STATICFILES_DIRS = ( os.path.join(BASE_DIR,"static_in_pro","our_static"),  
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static_in_env","media_root") 
url.py

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) –

_pro/our_static中的文件夹
/app/my app/static\u不存在,如错误消息中所述:

OSError: [Errno 2] No such file or directory: '/app/my app/static_in_pro/our_static'

因此,请创建它和任何不存在的父目录,然后重新运行您的命令。

如错误消息中所述,pro/our\u static中的文件夹
/app/my app/static\u不存在:

OSError: [Errno 2] No such file or directory: '/app/my app/static_in_pro/our_static'

因此,创建它和任何不存在的父目录,然后重新运行您的命令。

请显示您的静态文件设置。这是我对静态文件的设置#静态资产配置static_URL='/static/'static_ROOT=os.path.join(os.path.dirname(BASE_DIR),“static_in_env”,“static_ROOT”)staticfiles_DIRS=(os.path.join(BASE_DIR),“static_in_pro”,“our_static”),#os.path.join(BASE_DIR,'static_in_env'),)MEDIA_URL='/MEDIA/'MEDIA_ROOT=os.path.join(os.path.dirname(BASE_DIR),“static_in_env”,“MEDIA_ROOT”)URL.py if settings.DEBUG:urlpatterns+=static(settings.static_URL,document_ROOT=settings.static_ROOT=settings)urlperns+=static=static(settings.MEDIA\u URL,document\u root=settings.MEDIA\u root)我试图自己做,但意识到由于格式丢失,我不得不猜测,因此:请编辑您的问题以包括您的设置。(另外,包括您的WSGI;您是否在使用Heroku Django quickstart建议和Clang?)检查目录
“/app/my app/static\u in_pro/our_static”
是否存在于您的服务器中(如果不创建)。如果无法创建,请将值为
app/my app
的变量更改为现有目录该目录存在,但与此app/static\u in_pro/our_static类似,并且我无法在其上的my repo中创建文件夹请显示您的静态文件设置。这是我对静态文件的设置#静态资产配置static_URL='/static/'static_ROOT=os.path.join(os.path.dirname(BASE_DIR),“static_in_env”,“static_ROOT”)静态文件_DIRS=(os.path.join(BASE_DIR,“static_in_pro”,“our_static”),#os.path.join(BASE_DIR,'static_in_env'),)MEDIA_URL='/MEDIA/'MEDIA_ROOT=os.path.join(os.path.dirname(BASE_DIR),“static_in_env”,“MEDIA_ROOT”)URL.py if settings.DEBUG:urlpatterns+=static(settings.static_URL,document_ROOT=settings.static_ROOT)urlpatterns+=static(settings.MEDIA_URL,document_ROOT=settings.MEDIA_ROOT=settings.MEDIA_ROOT)我试着自己做,但意识到由于格式丢失,我不得不猜测,所以取而代之的是:请编辑您的问题以包括您的设置。(同时,包括您的WSGI;您是否使用Heroku Django quickstart建议与cling?)检查目录
“/app/my app/static\u in_pro/our_static”
是否存在于您的服务器中(如果不创建)。如果无法创建,请将值为
app/my app
的变量更改为现有目录该目录存在,但与此app/static\u in_pro/our_static类似,并且我无法在其上的my repo中创建文件夹狂欢节上的奥库