简体   繁体   English

如何在 Heroku 中运行 python 包 pdf2image:不工作

[英]How to run python package pdf2image in Heroku: not working

I am trying to run python dash application in Heroku.我正在尝试在 Heroku 中运行 python dash 应用程序。 Since I am using pdf2image package that also has a dependency with poppler, working fine in my dev environment but when I deploy the same in Heroku, my code is getting stuck at this point: without any progress由于我使用的 pdf2image 包也与 poppler 有依赖关系,因此在我的开发环境中工作正常,但是当我在 Heroku 中部署它时,我的代码在这一点上卡住了:没有任何进展

PDF to Image conversion started for file: HH689
2020-09-13T19:32:48.177754+00:00 app[web.1]: convert from path
2020-09-13T19:32:48.198294+00:00 app[web.1]: 10.52.12.238 - pdfocr [13/Sep/2020:19:32:48 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://pdf-text-ocr.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
2020-09-13T19:32:48.199716+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=pdf-text-ocr.herokuapp.com request_id=1b268520-1ca8-464b-8256-0dfa2c5c7f5d fwd="49.206.3.8,165.225.124.180" dyno=web.1 connect=0ms service=24ms status=500 bytes=470 protocol=https

I have also added all the necessary buildpacks;我还添加了所有必要的构建包; poppler, imagemagick and ghost script in the path.路径中的 poppler、imagemagick 和 ghost 脚本。

在此处输入图像描述

Check the Heroku package you are using;检查您正在使用的 Heroku 包; package details In case you are using Heroku 18, you will have Imagemagick and Ghost script by default installed in your package.包详细信息如果您使用的是 Heroku 18,则默认情况下会在包中安装 Imagemagick 和 Ghost 脚本。 Not necessary to add buildpacks additionally.不需要额外添加构建包。

only add this poppler buildpack which is compatible with Heroku 18:只添加与 Heroku 18 兼容的 poppler buildpack:

heroku create --buildpack https://github.com/Fieldwire/heroku-buildpack-poppler.git

https://stackoverflow.com/questions/60234991/how-to-use-npm-pdf-image-package-in-heroku-app https://stackoverflow.com/questions/60234991/how-to-use-npm-pdf-image-package-in-heroku-app

Regards,问候,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM