‘int’ object is not callable

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

This probably means that you are trying to call a method when a property with the same name is already available.

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:

rowcount=worksheet1.rows()
Try changing the line to this:

rowcount=worksheet1.rows

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s