Getting this error Error sqlite3 InterfaceError Error binding parameter 0 - probably unsupported type

0 votes

I am using python 2.7 with pyqt4.10 and sqlite3 Db, trying to get the user input from QlineEdit to insert into sqlite3 table that is already created

As you see i used input_user = self.lineEdit.text() to get the user input from the QlineEdit

The error is :

Traceback (most recent call last):
  File "C:\python\townoftechwarehouse\add_category.py", line 63, in proc
    c.execute("INSERT INTO categories (category_name) VALUES (?)", (input_user, ))
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

Oct 1, 2018 in Python by bug_seeker
• 15,520 points
11,925 views

1 answer to this question.

0 votes

Found out that the problem was that am using Arabic characters which is not readable for qslite3 so I have to use unicode, here is the edit:

Changed :

input_user = self.lineEdit.text()

To :

   input_user1 = self.lineEdit.text()
   input_user = unicode(input_user1)
answered Oct 1, 2018 by Priyaj
• 58,090 points

Related Questions In Python

0 votes
0 answers

why iam getting this error

Sep 9, 2019 in Python by NEELAPALA
• 120 points

reopened Sep 9, 2019 by Omkar 620 views
+2 votes
0 answers

unsupported operand type error

tech_list=closingdata.pct_change() tech_list READ MORE

Jan 26, 2020 in Python by Anupriya
• 140 points
489 views
0 votes
1 answer

I tried to install this pip cryptography in Pycharm but I'm getting an error

Hello @Dilpreet , Have you tried updating pip version? ...READ MORE

answered Aug 4, 2020 in Python by Niroj
• 82,880 points
2,960 views
0 votes
1 answer

i am getting this error "TypeError: tuple indices must be integers or slices, not Database"

Hi, @Shabaj, Regarding your query, I hope this ...READ MORE

answered Dec 10, 2020 in Python by Gitika
• 65,910 points
897 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,067 views
0 votes
1 answer
0 votes
1 answer

Generate random integers between 0 and 9

Try: from random import randint print(randint(0, 9)) More info: ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 58,090 points
1,031 views
0 votes
2 answers

Indentation Error in Python

Use tabs instead of spaces. This is ...READ MORE

answered Feb 15, 2019 in Python by Shashank
• 1,370 points
683 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP