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\", 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,350 points

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
• 56,920 points

Related Questions In Python

0 votes
1 answer

Python error: unsupported operand type(s) for -: 'str' and 'str'

Hi. This error is caused because you ...READ MORE

answered May 12 in Python by Anjali
0 votes
0 answers

why iam getting this error

Sep 8 in Python by NEELAPALA
• 120 points

reopened Sep 9 by Omkar 35 views
0 votes
1 answer

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

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,520 points
0 votes
1 answer

Getting AttributeError: 'module' object (scipy) has no attribute 'misc' in Python. How to solve this?

>>> import scipy >>> scipy.misc Traceback (most recent call ...READ MORE

answered Dec 24, 2018 in Python by Nymeria
• 3,520 points
+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 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 341 views
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
• 56,920 points
0 votes
2 answers

Indentation Error in Python

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

answered Feb 14 in Python by Shashank
• 1,350 points