Error binding parameter 0 - probably unsupported type

390 views
Skip to first unread message

ruban bharath

unread,
Aug 13, 2018, 8:42:26 AM8/13/18
to Django users
how to resolve from this error  Error binding parameter 0 - probably unsupported type


db = sqlite3.connect('db.sqlite3')
cursor = db.cursor()
cursor.execute('insert into music_final(username,meaning) values(?,?)', (name, meaning))
db.commit()

Julio Biason

unread,
Aug 13, 2018, 8:47:12 AM8/13/18
to django...@googlegroups.com
Hi Ruban,

Well, what's the type of `name`? That's what the error is saying: You're passing a type that SQLite doesn't understand properly.

Also, why are you not using models to do that for you?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5bb72467-21c0-426e-9699-1c654d4511b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554

ruban bharath

unread,
Aug 13, 2018, 8:57:14 AM8/13/18
to Django users
Thank you sir,
 The datatype of the name is text and i am new to django sir so i dint have clear knowledge  about it that's my problem sir 
and now what should i do to overcome this issue sir


On Monday, August 13, 2018 at 6:17:12 PM UTC+5:30, Julio Biason wrote:
Hi Ruban,

Well, what's the type of `name`? That's what the error is saying: You're passing a type that SQLite doesn't understand properly.

Also, why are you not using models to do that for you?
On Mon, Aug 13, 2018 at 9:42 AM, ruban bharath <rubanbh...@gmail.com> wrote:
how to resolve from this error  Error binding parameter 0 - probably unsupported type


db = sqlite3.connect('db.sqlite3')
cursor = db.cursor()
cursor.execute('insert into music_final(username,meaning) values(?,?)', (name, meaning))
db.commit()

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Julio Biason

unread,
Aug 13, 2018, 9:39:26 AM8/13/18
to django...@googlegroups.com
Hey Ruban,

I'd suggest taking a look at the second part of the Django Tutorial: https://docs.djangoproject.com/en/2.1/intro/tutorial02/

It explains how models work and how they interact with the database -- which is basically what you're trying to do.

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.

ruban bharath

unread,
Aug 14, 2018, 12:28:23 AM8/14/18
to Django users
Thank you sir
Reply all
Reply to author
Forward
0 new messages