thanks so much,here you have the error: --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-16-64f0293cca64> in <module>() 43 status = line[-4:] # and overall status pass/warn/fail 44 sql = "insert into fastqc_summary(fileid,module,status,total,duplicate) values(?,?,?,?,?);" ---> 45 data = (fileid,module, status,total,dup) 46 cursor.execute(sql, data) 47 elif (line[:2] != ">>" and line [:2] != "##"): # grab details under each module
NameError: name 'total' is not defined The problem It is I need to write only if exist that names and values. So from the original file each time I have this rows: ##FastQC 0.10.1 >>Basic Statistics pass #Measure Value Filename R05_CTTGTA_L004_R1_001.fastq.gz File type Conventional base calls Encoding Sanger / Illumina 1.9 Total Sequences 27868496 Filtered Sequences 0 Sequence length 50 %GC 50 >>END_MODULE So they need to be defined. So know I need to do: if Total and if Filename and Total then do the script? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor