#๐ why does it say str object not callable
14 messages ยท Page 1 of 1 (latest)
@agile night
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
oh so I restarted the whole thing, and it solved it
but still, why did it happen tho
At some point in the past you did input = and it stores a string now.
Even if the cell got deleted/fixed, the executed code's effects stay - but when you restart, only currently existing cells are executed
(To fix it without restarting, you'd want to add del input to delete your overwritten version of the name that hides the builtin name.
And since the offending input = doesn't exist anymore in your code, you'd want to delete that cell after running as well - because after restart it wouldn't have any overwritten input to delete)
!e
input = "something"
# possibly many lines after
a = input("this will error")
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 3, in <module>
003 | a = input("this will error")
004 | ^^^^^^^^^^^^^^^^^^^^^^^^
005 | TypeError: 'str' object is not callable
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.