OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Azure Functions no job found (python)

  • Thread starter Thread starter rickvanveldhuisen
  • Start date Start date
R

rickvanveldhuisen

Guest
I have developed an azure function app. It is in Python and works perfectly fine. I first developed this in a virtual environment using pyenv on my laptop.

Now, I switched to another laptop, downloaded the function app and set a new virtual environment for this laptop. The function starts fine and the virtual environment works. The packages are installed as far as I can see.

However, when starting the function, I get the error 'No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.)'.

I have seen others with similar issues. However, these issues were mostly in the host.json and the local.settings.json.I have not yet been able to find a solution to it, or an error in both of these files. Also, my function_app.py does not throw any errors (possibly because it is not seen...)

The first few lines of my function_app.py, where i added the @app.function_name line as per previous posts:

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

@app.function_name("func")
@app.route(route="http_example", auth_level=func.AuthLevel.ANONYMOUS)
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')

the host.json:

Code:
{
"version": "2.0",
"logging": {
"applicationInsights": {
    "samplingSettings": {
    "isEnabled": true,
    "excludedTypes": "Request"
    }
}
},
"extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.15.0, 4.0.0)"
    }
}

the local.settings.json:

Code:
{
  "IsEncrypted": false,
  "Values": {
  "FUNCTIONS_WORKER_RUNTIME": "python",
  "AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
  "AzureWebJobsStorage": "UseDevelopmentStorage=true"
  }
  }

It is good to know that this is another laptop, logged in with an account from another tenant. I am not sure if this may cause an issue.

Thank you in advance.
<p>I have developed an azure function app. It is in Python and works perfectly fine. I first developed this in a virtual environment using pyenv on my laptop.</p>
<p>Now, I switched to another laptop, downloaded the function app and set a new virtual environment for this laptop. The function starts fine and the virtual environment works. The packages are installed as far as I can see.</p>
<p>However, when starting the function, I get the error 'No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.)'.</p>
<p>I have seen others with similar issues. However, these issues were mostly in the host.json and the local.settings.json.I have not yet been able to find a solution to it, or an error in both of these files. Also, my function_app.py does not throw any errors (possibly because it is not seen...)</p>
<p>The first few lines of my function_app.py, where i added the @app.function_name line as per previous posts:</p>
<pre><code>app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

@app.function_name("func")
@app.route(route="http_example", auth_level=func.AuthLevel.ANONYMOUS)
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
</code></pre>
<p>the host.json:</p>
<pre><code>{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.15.0, 4.0.0)"
}
}
</code></pre>
<p>the local.settings.json:</p>
<pre><code>{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
}
}
</code></pre>
<p>It is good to know that this is another laptop, logged in with an account from another tenant. I am not sure if this may cause an issue.</p>
<p>Thank you in advance.</p>
 
Top