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,510 points
5,659 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
• 57,700 points

Related Questions In Python

0 votes
0 answers

why iam getting this error

Sep 8, 2019 in Python by NEELAPALA
• 120 points

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

unsupported operand type error

tech_list=closingdata.pct_change() tech_list READ MORE

Jan 26 in Python by Anupriya
• 140 points
205 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 in Python by Niroj
• 78,520 points
262 views
+1 vote
8 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

Just for the record: >>> int('55063.000000') Traceback (most recent ...READ MORE

answered Aug 17 in Python by pakainfo
• 200 points
183,517 views
+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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,568 views
0 votes
0 answers
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
• 57,700 points
224 views
0 votes
2 answers

Indentation Error in Python

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

answered Feb 14, 2019 in Python by Shashank
• 1,370 points
237 views