Reading the metadata (blob and container name) from azure functions using python, but during processing it says NoneType

Below is the code,

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


 none type object has not attribute split   

Expected output:


Please guide on how to fix this issue..

Add Comment
1 Answer(s) returns None:

>>> import logging >>> s ='test') >>> type(s) <class 'NoneType'> 

so the error is expected.

You want to use:

fname ="/")[1] 
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.