Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Python Function to Azure Function App failed #702

Closed
silvermoong opened this issue Oct 11, 2018 · 5 comments
Closed

Deploy Python Function to Azure Function App failed #702

silvermoong opened this issue Oct 11, 2018 · 5 comments

Comments

@silvermoong
Copy link

Repro steps:
I'm using the auto generated Python HTTP triggered function and I'm able to debug and run it locally(with localhost url).

I firstly tried to deploy my function to my existing Function App (It has no function in it) on Azure. The deployment succeeded and I can see the new function be added into the Function App. But I got 404 when I clicked run or enter the function URL in my browser.

I then did the second deployment by creating a new Function App and Storage Account in Central US. This time I'm getting "Requested features are not supported in region." error.

When I browse the resources, I can see the Resource Group and Storage Account are created, but the Function App is not.

Action: azureFunctions.deploy
Error type: BadRequest
Error Message: Requested features are not supported in region.

Version: 0.11.0
OS: win32

@ejizba
Copy link
Member

ejizba commented Oct 11, 2018

Yes that error message is expected for Linux Consumption function apps (the only type that supports Python). Right now we show all regions, but we have an existing issue to filter out the regions that don't support it: #641

I'm more interested in your 404 error. Do you see the function listed in the explorer? Was this an anonymous http trigger? Or did it have auth?

@silvermoong
Copy link
Author

silvermoong commented Oct 11, 2018

Hello Eric,

Thanks for the explanation.

The 404 error is happening on a Function App that I create through portal UI. I don't remember how did I set it up, but this is definitely not a Linux Function App. So I guess this could be the issue.

I deployed my python function form VS Code to the Function App. I can see it listed in the Function App. I can't run it nor access from the Function URL. It is an anonymous http trigger.

image

image

@ejizba
Copy link
Member

ejizba commented Oct 11, 2018

Here's a wiki on the preview support for Python: https://github.com/Azure/Azure-Functions/wiki/Azure-Functions-on-Linux-Preview

If you deploy through VS Code and create a new function app - make sure to use one of these regions (copied from the doc above):

  • West US
  • East US
  • West Europe
  • East Asia

@silvermoong
Copy link
Author

Hello Eric,

It works after I create the Function App from VS Code and located in East US.

Thanks for the solution

@ejizba
Copy link
Member

ejizba commented Oct 11, 2018

Awesome! I know this isn't the most obvious set of steps, but we already have a few issues to track improvements (#619 #641), so I'll go ahead and close this issue.

@ejizba ejizba closed this as completed Oct 11, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants