"TypeError 'int' or 'float' object is not callable"
Last edited on
If you get an error message like one of these:
TypeError: 'int' object is not callable
TypeError: 'float' object is not callable
TypeError: 'str' object is not callable
It probably means that you are trying to call a method when a property with the same name is available. If this is indeed the problem, the solution is easy. Simply change the method call into a property access.
For example, if a line like this causes an error message like one of those above:
We would like to use Google Analytics to get a better understanding of how
you use the website.
By agreeing to this, your usage data will be stored in the USA and processed
by Google LLC. Both Google as well as federal US agencies can access this data
and combine it with any other data about you, such as your search history,
personal accounts or any other data known to Google.