Forum Discussion
Python optimizer / PowerApps / Automate
- Anonymous5 years ago
HI Anonymous,
#1, You can create PowerApps with parameters, then they allow you to input parameters.
Launch and Param functions in Power Apps
#2, Please check the following link about use PowerApps with ms flow.
#3, You can do these with Azure functions, you can take a look at the below link to know more about these.
Create your first function in the Azure portal
#4, You can refer to the following blog about invoke the Azure function in flow:
Invoke an Azure Function Using Power Automate (Flow)
Regards,
Xiaoxin Sheng
- Anonymous5 years ago
Hi Anonymous,
Sorry for the late response. Did you mean to use python to connect/manage Azure VM? If that is the case, you can refer to the following documents:
Create and manage Windows VMs in Azure using PythonReference link about azure function network operations:
Azure Functions networking options
Regards,
Xiaoxin Sheng
It fails at this command: func new --name HttpExample --template "HTTP trigger" --authlevel "anonymous"
HI Anonymous,
So you mean you can't finish the create function app steps to redirect to the detail develop menu?
If this is a case, have you checked you have corresponded permissions to do operate with azure functions apps?
In addition, you can contact azure admin/support with detailed error messages and these request id to get further support.
Regards,
Xiaoxin Sheng
- Anonymous5 years agoNot applicable
Hi Anonymous !
Amazing, that was the issue -- thanks for your help again.
If you dont mind, I am running into an issue again. The function is now locally working, but when I try to deploy onto Azure, I get the following error traceback:
Exception while executing function: Functions.HttpExample Result: Failure Exception: PulpSolverError: Pulp: Error while executing /home/site/wwwroot/.python_packages/lib/site-packages/pulp/apis/../solverdir/cbc/linux/64/cbc Stack: File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 355, in _handle__invocation_request call_result = await self._loop.run_in_executor( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 542, in __run_sync_func return func(**params) File "/home/site/wwwroot/HttpExample/__init__.py", line 22, in main return func.HttpResponse(f"{optimize(name)}") File "/home/site/wwwroot/HttpExample/__init__.py", line 100, in optimize model.solve(solver) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/pulp.py", line 1737, in solve status = solver.actualSolve(self, **kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/apis/coin_api.py", line 101, in actualSolve return self.solve_CBC(lp, **kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/apis/coin_api.py", line 159, in solve_CBC raise PulpSolverError("Pulp: Error while executing "+self.path)Based on this file: https://github.com/coin-or/pulp/blob/master/pulp/apis/coin_api.py
It looks like it fails here on line 158/9:
if not os.path.exists(tmpSol): raise PulpSolverError("Pulp: Error while executing "+self.path)maybe when deploying, it doesnt have / cant find the os path?
Couldn't find the same issue on the web, except this: https://github.com/Azure/azure-functions-python-worker/issues/465 which suggests using Docker --
but is there an alternative to Docker? how should I proceed?
thanks for your help
- Anonymous5 years agoNot applicable
ah, please ignore -- i fiex with parameter keepFiles=True
I now have this issue lol
Exception while executing function: Functions.HttpExample Result: Failure Exception: OSError: [Errno 30] Read-only file system: 'Budget_model-pulp.mps' Stack: File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 355, in _handle__invocation_request call_result = await self._loop.run_in_executor( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 542, in __run_sync_func return func(**params) File "/home/site/wwwroot/HttpExample/__init__.py", line 22, in main return func.HttpResponse(f"{optimize(name)}") File "/home/site/wwwroot/HttpExample/__init__.py", line 100, in optimize model.solve(solver) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/pulp.py", line 1737, in solve status = solver.actualSolve(self, **kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/apis/coin_api.py", line 101, in actualSolve return self.solve_CBC(lp, **kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/apis/coin_api.py", line 114, in solve_CBC vs, variablesNames, constraintsNames, objectiveName = lp.writeMPS(tmpMps, rename = 1) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/pulp.py", line 1611, in writeMPS return mpslp.writeMPS(self, filename, mpsSense = mpsSense, rename = rename, mip = mip) File "/home/site/wwwroot/.python_packages/lib/site-packages/pulp/mps_lp.py", line 223, in writeMPS with open(filename, "w") as f:i understand i cant write to the azure fn directory -- but im wondering how its possible to work around this if its in a library im calling -- maybe create a blob storage for this "filename" -- will have to keep digging into it
- Anonymous5 years agoNot applicable
i'm trying to play around wtih some parameters when calling the function that is in the pulp library, no luck yet - will keep you posted