'str' object is not callable

39 views
Skip to first unread message

Salima Begum

unread,
Sep 23, 2020, 11:55:06 AM9/23/20
to django...@googlegroups.com
Hi all,

I am getting this error. May I know the reason why this error occurred?

Here I attached two screenshots please review and let me know.

Thank you
~salima


Screenshot (2).png
Screenshot (1).png

Avi shah

unread,
Sep 23, 2020, 12:09:54 PM9/23/20
to django...@googlegroups.com
Try adding ''' as it can only take one string as parameter , ''' ''your message'' . '' your message 2 '' '''

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMSz6b%3DgkYNkLXb6foQWr-vO5ZeU%3Draix-wp2rCNU3_eO2BxEg%40mail.gmail.com.

Alam Khazi

unread,
Sep 23, 2020, 12:15:57 PM9/23/20
to django...@googlegroups.com

Khaleel Ahmed H. M. Shariff

unread,
Sep 23, 2020, 2:49:34 PM9/23/20
to django...@googlegroups.com
Hi, 
May Peace, Blessings & Mercy of Almighty God be on you!
The reason for 'str' object is not callable is because you have created a string object & given parenthesis along with it. As is,
>>> x="Good Morning"
>>> x()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' object is not callable
>>>
image.png
Hope this helps.

Thanks in advance. 


God Bless You!
God Bless India!!

--

Love & Regards
Dr. (h.c.) Khaleel Ahmed H. M.

Managing Director, Tanzanite Realty India Private Limited

-----------------------------------------------------------------------

Human Life is Precious
Koran Surah Ma'idah Chapter 5 Verse 32:
If anyone killed a person, not in retaliation of murder, or (and) to spread mischief in the land - it would be as if he killed all mankind, & if anyone saved a life, it would be as if he saved the life of all mankind.



On Wed, Sep 23, 2020 at 9:24 PM Salima Begum <sali...@rohteksolutions.com> wrote:
Reply all
Reply to author
Forward
0 new messages