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