Dear all,

I tried concatenating string variables with multiple strings and have the
file handle write the statement into a file. I don't know why I always get
the type error: must be string or read-only character buffer, not seq error.
I tried casting the whole new concatenated string using str(), but was not
successful as well. Do you have any clue why this happen?

Best,

Kann


#############################################################
 42
 43         statement = 'mirna = miRBase(accession = "' + mir_acc + '", '\
 44             + 'name = "' + mir_name + '", '\
 45             + 'specie = "' + mir_specie + '", '\
 46             + 'description = "' + mir_desc + '", '\
 47             + 'refDBs = "' + mir_dbrefs + '", '\
 48             + 'comment = "' + mir_comment + '", '\
 49             + 'seq = "' + mir_seq + '")' + "\n"
 50
 51
 52         str(statement)
 53         insert.write(statement)

############################################################3
processing the insert statment
Traceback (most recent call last):
  File "mirbase.py", line 60, in <module>
    generate_insert(db_file)
  File "mirbase.py", line 53, in generate_insert
    insert.write(statement)
TypeError: must be string or read-only character buffer, not Seq
#############################################################
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to