Hi Aakash,

Aakash Baranwal – Tue, 16. April 2019 11:12

> The error I am getting is:int() argument must be a string, a bytes-like object
> or a number not 'builtin_function_or_method'.
>
> The error is in views.py file in obj = str(Video.objects.get(id=id)).

You need to pass an id argument to your video_detail_view() function.

The reason for the rather obscure error message you are getting is, that "id" 
is a builtin function in python. Try this in a python shell:

>>> type(id)
<class 'builtin_function_or_method'>

If you had named the argument something else, you'd get a less confusing error 
message.

Hope this helps.

Kind regards,

Kasper Laudrup

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/20190416093628.Horde.HfLj1UxMG_IDKVfpOv1As-a%40cloud.stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to