5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure Functionsで関数が表示されない。

Posted at

起きた問題

PythonでAzure Functionsを利用していてAzure Portal上で関数が表示されなくなった。

対処方法

import osやimport requestを関数内に移動した。
import loggingとimport azure.functions as funcと並列にimport osやimport requestを書くとazure portal上から関数がなくなる。

対処前

functuon_app.py
import azure.functions as func
import logging
import os
from urllib import request
from urllib import parse
import json

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

@app.route(route="http_trigger")
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    
以下略

→ポータルで関数が見られなくなる。

対処後

functuon_app.py
import azure.functions as func
import logging

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

@app.route(route="http_trigger")
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    import os
    from urllib import request
    from urllib import parse
    import json
以下略

→関数が見られる。

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?