python dash教程,将Python Dash应用程序部署到Azure

Hello everyone,

I am trying to deploy a dash app to Azure app service but have some issues.

You can have a look at my code here:

https://bitbucket.org/Spagoot/dash-test/src/master/

The error message I receive is:

2019-04-18T12:37:03.429587986Z

2019-04-18T12:37:03.429685187Z _____

2019-04-18T12:37:03.443294900Z / _ \ __________ _________ ____

2019-04-18T12:37:03.443316600Z / /_\ \___ / | \_ __ \_/ __ \

2019-04-18T12:37:03.443326100Z / | \/ /| | /| | \/\ ___/

2019-04-18T12:37:03.443334700Z \____|__ /_____ \____/ |__| \___ >

2019-04-18T12:37:03.443343000Z \/ \/ \/

2019-04-18T12:37:03.443351200Z

2019-04-18T12:37:03.443529502Z A P P S E R V I C E O N L I N U X

2019-04-18T12:37:03.443541302Z

2019-04-18T12:37:03.443549402Z Documentation: http://aka.ms/webapp-linux

2019-04-18T12:37:03.443557402Z

2019-04-18T12:37:03.702677851Z Starting OpenBSD Secure Shell server: sshd.

2019-04-18T12:37:03.741625074Z App Command Line not configured, will attempt auto-detect

2019-04-18T12:37:03.757502906Z Launching oryx with: -appPath /home/site/wwwroot -output /opt/startup/startup.sh -virtualEnvName antenv -defaultApp /opt/defaultsite -hostBind 0.0.0.0:8000

2019-04-18T12:37:03.812797764Z Oryx Version : 0.2.20190223.1, Commit: d47733e19fa1522f83aae249301bad5e04cf7a0f

2019-04-18T12:37:03.812857365Z

2019-04-18T12:37:03.812871165Z Found file '/home/site/wwwroot/application.py' to run the app with.

2019-04-18T12:37:04.689322733Z Detected flask app.

2019-04-18T12:37:05.054970766Z Writing output script to '/opt/startup/startup.sh'

2019-04-18T12:37:05.214941892Z Using packages from virtual environment antenv.

2019-04-18T12:37:06.640701316Z [2019-04-18 12:37:06 +0000] [36] [INFO] Starting gunicorn 19.9.0

2019-04-18T12:37:06.662029393Z [2019-04-18 12:37:06 +0000] [36] [INFO] Listening at: http://0.0.0.0:8000 (36)

2019-04-18T12:37:06.662052793Z [2019-04-18 12:37:06 +0000] [36] [INFO] Using worker: sync

2019-04-18T12:37:06.678436729Z [2019-04-18 12:37:06 +0000] [39] [INFO] Booting worker with pid: 39

2019-04-18T12:37:26.858010988Z Application object must be callable.

2019-04-18T12:37:26.876205339Z [2019-04-18 12:37:26 +0000] [39] [INFO] Worker exiting (pid: 39)

2019-04-18T12:37:27.281385799Z [2019-04-18 12:37:27 +0000] [36] [INFO] Shutting down: Master

2019-04-18T12:37:27.291115680Z [2019-04-18 12:37:27 +0000] [36] [INFO] Reason: App failed to load.

I have exposed the app and server variable, why does it claim that the application object is not callable?

Does anyone have expereince at deploying a dash app or are there any examples?

I find a lot for other hosting services but i would like to use Azure due to the easy azure ad authentication...

Best regards,

Marc

解决方案That error occurs when you try to call, with(),

an object that is not callable.

A callable object can be a function or a class (that implements__call__method).

According to Python Docs:

object.__call__(self[, args...]): Called

when the instance is “called” as a function

For example:

x =1

printx()

xis not a callable object, but you are

trying to call it as if it were it. This example produces the error:

TypeError:'int'objectisnotcallable

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值