Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

getting an error while fetching data from database (mysql). n="+".join(n) TypeError: can only join an iterable

conn = mysql.connector.connect(host="localhost", user="root", password="", database="Attendance")
my_cursor = conn.cursor()

                            my_cursor.execute("select Name from student where Student_id="+str(id))
                            n=my_cursor.fetchone()
                            n="+".join(n)

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Please check the value of n before joining if it is an iterable. Probably it’s None.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading