Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ReportLab不在Azure Python网站上工作_Python_Django_Azure_Reportlab - Fatal编程技术网

ReportLab不在Azure Python网站上工作

ReportLab不在Azure Python网站上工作,python,django,azure,reportlab,Python,Django,Azure,Reportlab,我在VisualStudio中使用PTV在Python3.4、Django 1.7.3上构建了一个非常简单的应用程序。本地一切正常,但当我发布到Azure Python网站时 Traceback (most recent call last): File ".\app\views.py", line 69, in home rml2pdf.go(rml, outputFileName=buf) File "rlextra-3.1.45/src/rlextra/rml2pdf/rml2pdf.py

我在VisualStudio中使用PTV在Python3.4、Django 1.7.3上构建了一个非常简单的应用程序。本地一切正常,但当我发布到Azure Python网站时

Traceback (most recent call last): File ".\app\views.py", line 69, in home rml2pdf.go(rml, outputFileName=buf) File "rlextra-3.1.45/src/rlextra/rml2pdf/rml2pdf.py", line 5638, in go ImportError: DLL load failed: %1 is not a valid Win32 application.
最重要的是
DLL加载失败:%1不是有效的Win32应用程序。
。这是我的密码

try:
    from io import BytesIO
    buf = BytesIO()
    rml2pdf.go(rml, outputFileName=buf)
    buf.seek(0)
    pdfData = buf.read()
    response = HttpResponse(content_type='application/pdf')
    response.write(pdfData)
    response['Content-Disposition'] = 'attachment; filename=output.pdf'
    return response
except:
    response = HttpResponse()
    response.write(traceback.format_exc())
    return response

我已经从Azure portal将32位更改为64位,但运气不好

我已经完成了所有步骤。现在它开始工作了。问题可能在于出版

您是如何将reportlab安装到PTVS项目的VirtualNV中的?请像任何Microsoft PTVS教程一样,添加更多代码和有关项目结构的更多信息。有两个选项:我重新创建项目结构,遇到相同错误,并提供建议,或者我就有关项目结构和代码的给定信息提出建议。我希望先用秒的方法。确保安装了reportlab-如果您使用的是virtualenv,请确保您激活了virtualenv的python。