Raphael Titus
Raphael Titus

Reputation: 193

No module named twilio found while working with azure functions

Below is the code,

import logging
import json, os
import azure.functions as func
import twilio
import twilio.rest
from twilio.rest import Client
def main(myblob: func.InputStream):
    filename = logging.info(f"Python blob trigger function processed blob \n"
             #f"Name: {myblob.name}\n"
             #f"Blob Size: {myblob.length} bytes")
    filename = logging.info(myblob.name)
    print(filename)     #output - teamaudio/22108192-9a74-4b6e-a237.wav
    fname = filename.split("/")[1]
    print(fname)
    client = Client(account_sid,auth_token)

Error : No module named twilio found when we trigger azure functions

Please guide on how to import twilio, twilio.rest in azure functions.

Upvotes: 1

Views: 97

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222712

You need to install the dependencies , do you have requirement.txt which contains the dependencies?

Otherwise you can open Kudu and manually install the dependency using pip install twillio.

Upvotes: 1

Related Questions