- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 heroku 上运行 geodjango 应用程序,我添加了一个构建包以使 gdal
可用
https://github.com/cyberdelia/heroku-geo-buildpack.git .在推送期间,它说 gdal
和其他 geotools 已成功安装
remote: -----> geos/gdal/proj app detected
remote: Using geos version: 3.6.1
remote: Using gdal version: 2.1.3
remote: Using proj version: 4.9.3
remote: -----> Vendoring geo libraries done
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.4 (you are using python-3.6.2, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version (python-3.6.4).
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote: 1018 static files copied to '/tmp/build_2e0a13e9519778105269a34/test/staticfiles', 1158 post-processed.
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 235.8M
remote: -----> Launching...
remote: Released v60
remote: https://test.herokuapp.com deployed to Heroku
remote:
remote: Verifying deploy... done.
当我请求页面时,它说应用程序错误。
来自 heroku 日志
2018-03-19T14:25:00.614100+00:00 app[web.1]: from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi
2018-03-19T14:25:00.614103+00:00 app[web.1]: from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
2018-03-19T14:25:00.614104+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/gis/gdal/libgdal.py", line 43, in <module>
2018-03-19T14:25:00.614106+00:00 app[web.1]: % '", "'.join(lib_names)
2018-03-19T14:25:00.614813+00:00 app[web.1]: [2018-03-19 14:25:00 +0000] [9] [INFO] Worker exiting (pid: 9)
2018-03-19T14:25:00.746744+00:00 app[web.1]: [2018-03-19 14:25:00 +0000] [4] [INFO] Shutting down: Master
2018-03-19T14:25:00.746839+00:00 app[web.1]: [2018-03-19 14:25:00 +0000] [4] [INFO] Reason: Worker failed to boot.
2018-03-19T14:25:00.614110+00:00 app[web.1]: django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.>
我应该在设置中指定一些路径还是我使用的是不兼容的版本? (我正在使用 Django==2.0.2
)
最佳答案
来自 Heroku's docs ,将以下内容添加到您的 settings.py 中:
import dj_database_url
DATABASES['default'] = dj_database_url.config()
DATABASES['default']['ENGINE'] = 'django.contrib.gis.db.backends.postgis'
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
关于Heroku:django.core.exceptions.ImproperlyConfigured:找不到 GDAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49365510/
我正在尝试为 django (1.7) 项目运行一些睾丸。 在项目目录下创建了一个test_models.py目录/tests/ 关于运行测试 >> python tests/test_models.
我正在尝试为 django (1.7) 项目运行一些睾丸。 在项目目录下创建了一个test_models.py目录/tests/ 关于运行测试 >> python tests/test_models.
我正在使用 Pycharm 4 启动一个新的 Django 项目。我已经定义了各种模型,如果我运行这样的测试, from django.test import TestCase from models
这是错误信息: django.core.exceptions.ImproperlyConfigured: The included URLconf '' does not appear to have
自从我学习 Django 以来,我就在 virtualenv 中使用 pip 跟踪了 Django 的安装。当 Django Book 告诉我在 Python shell 中输入这个时, from d
我以前遇到过这个问题,但我设法找到了引用的循环导入。我再次面对它,但我找不到问题。 我的项目名称是“sare”,我的 sare/urls.py 如下所示: from django.contrib im
我正在尝试使用 Pycharm 社区版来改进我的 Django 应用程序中的代码,但我无法运行我想要的所有 Django 代码。我不断收到此回溯... Traceback (most recent c
执行以下命令时出现以下错误 from django.contrib.sessions.models import Session session = Session.objects.get(pk=se
我正在 Heroku 上设置我的 Django 项目。我一直在关注文档,但是当我 foreman start 时,我收到一个我不太明白的错误。我已经设置了我的引擎文件,但它似乎并不想工作。 完整回溯:
在ubuntu ec2节点上安装redis和django后,基于http://michal.karzynski.pl/blog/2013/07/14/using-redis-as-django-ses
我最近搬到了另一台机器上,不得不再次从 subversion 中检查我的项目,但我很确定这台计算机有 Django 1.8,而项目期待 1.7。 我尝试将我的数据库与代码同步以创建必要的表,但出现
我尝试与 peewee 建立 MySQL 连接,并按照他们网站上的教程进行操作: peewee quickstart 所以我的代码如下: from peewee import * db = MySQL
在尝试运行 ./manage.py runserver 或 shell 或任何其他与此相关的命令时,我收到错误:您必须定义“默认”数据库。 我在 virtualenv 中运行它,settings.py
我在我的虚拟机上安装了 Python Social Auth 并尝试运行 makemigrations 并收到此错误: Traceback (most recent call last): Fil
我按照 quickstart guide 中的说明安装和配置了django-admin-tools 的。这些是 settings.py 行: # INSTALLED APPS 'admin_tools
我正在为我的 Django 应用程序编写一个中间件,我从 request.session 获取一个变量,然后必须将它插入到 redis 排序集中。相当直接。 即 import os #os.envir
我的应用程序昨晚运行正常,不知道为什么今天早上就不能运行了。我认为我所做的只是创建一个名为 django 的应用程序来存储我的模型、测试和 View 。 出现此错误,在 OS X 上使用 Heroku
我正在尝试在 heroku 上运行 geodjango 应用程序,我添加了一个构建包以使 gdal 可用 https://github.com/cyberdelia/heroku-geo-buildp
我收到错误 CreateView 缺少 QuerySet。定义 CreateView.model、CreateView.queryset 或覆盖 CreateView.get_queryset()。
我正在尝试使用以下命令运行计划任务: celery -A Htweetprod2 beat 根据 Celery 4.0 文档启动计划任务,此命令应该有效,但我收到此错误: C:\Users\hisg3
我是一名优秀的程序员,十分优秀!