Home > Software design >  Brackets was not closed even after it closed pylance
Brackets was not closed even after it closed pylance

Time:05-18

I just copy-pasted this code block which I want to use on my script but this throwing red mark by pylance saying "(" "[" "{" was not closed, but I cannot find where I missed those, everything looks perfect for me

for idx, sentence in enumerate(sentences):
text = sentence['text'].lower()

sentence['audio'].export('books/audio_output/sample-' str(idx) '.mp3', format="mp3")

temp_df = pd.DataFrame([{'filename':'sample-' str(idx) '.mp3",'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':','duration':'}], columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)

CodePudding user response:

temp_df = pd.DataFrame([{'filename':'sample-' str(idx) ".mp3",
                         'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':'','duration':''}],
                       columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)
  • Related