Azure Function Triggers do not Run Scriptfile During Local Debug

ABuchanan 96 Reputation points
2020-09-02T15:34:17.697+00:00

When running local Debug on my function app the triggers will run and execute successfully, but they don't run the associated script file. A colleagues function app on the other hand will run the associated scriptfile on my machine when debugging locally.

Terminal output from run:

[9/3/2020 6:30:00 AM] Executing 'Functions.myFunctionTrigger' (Reason='Timer fired at 2020-09-03T00:30:00.0106463-06:00', Id=abe6c482-18a1-420d-946b-ee3c744a11d1)
[9/3/2020 6:30:00 AM] Executing 'Functions.myFunction2trigger' (Reason='Timer fired at 2020-09-03T00:30:00.0106429-06:00', Id=ceb45461-d8a2-426b-be7e-089cfe01d260)
[9/3/2020 6:30:00 AM]  INFO: Received FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:00 AM] Received FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:00 AM]  INFO: Function is sync, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc,function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:00 AM] Function is sync, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc,function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:00 AM]  INFO: Received FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:00 AM] myFunctiontrigger: running at 2020-09-03T06:30:00.054448
[9/3/2020 6:30:00 AM]  INFO: Function is sync, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc,function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:00 AM] Received FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:00 AM] Function is sync, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc,function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:03 AM]  INFO: Successfully processed FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:03 AM] myFuncton2trigger: running at 2020-09-03T06:30:03.751383
[9/3/2020 6:30:03 AM] Successfully processed FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: 3f2ea9bb-b7bc-4f2b-8cc4-08572ad1350e, invocation ID: abe6c482-18a1-420d-946b-ee3c744a11d1
[9/3/2020 6:30:03 AM] Executed 'Functions.myFunctiontrigger' (Succeeded, Id=abe6c482-18a1-420d-946b-ee3c744a11d1)
[9/3/2020 6:30:08 AM]  INFO: Successfully processed FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:08 AM] Successfully processed FunctionInvocationRequest, request ID: 62822468-54f9-4780-90e4-e47b9f4a7afc, function ID: c6a36751-c288-4bbd-a92d-6d882240ad83, invocation ID: ceb45461-d8a2-426b-be7e-089cfe01d260
[9/3/2020 6:30:08 AM] Executed 'Functions.myFunction2trigger' (Succeeded, Id=ceb45461-d8a2-426b-be7e-089cfe01d260)

my function trigger:

{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "name": "myFunction",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 */5 * * * *"
    }
  ]
}

init.py in the function folder is never run for my triggers, but is on the same machine for my colleagues triggers. I've compared everything I can think of between our work and I just can't find any differences in how our triggers are configured or organized.

I have a virtual environment configured and activated and CLI is up to date.

I'm sure this is something I'm doing/have done wrong, but I can't figure out what that is.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,073 questions
{count} votes

Accepted answer
  1. ABuchanan 96 Reputation points
    2020-09-03T21:00:09.643+00:00

    We've narrowed this down to a local issue returning values from our model service.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. sadomovalex 3,631 Reputation points
    2020-09-03T14:48:58.813+00:00

    hello,
    if colleague's Function app runs the associated script file locally try the following:

    1. use yours __init__.py with colleague's Function app - if it will be called then problem is in Function app project itself. In this case you may also create new Azure function app project in VS and use your __init__.py there. If it will work - just move other functions there and continue development on this new project
    2. use colleague's __init__.py with yours Function app - if it will be called then problem is in __init__.py file itself. There may be some hidden unicode characters, or lack of whitespaces which may be crucial for running Python files

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.