Python Forum
'>' not supported between instances of 'int' and 'str'
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'>' not supported between instances of 'int' and 'str'
#3
My fault - Larz60+ answer is the right one, please ignore my response.

Hi,

It looks as though you are trying to compare two values, where one is a number (int) and the other is text (str).

I have had a quick look at the code but need to make some changes to include the variabes being passed to the function.

If the two variables are actually numeric, there still may be a problem due to the fact that one of them is being stored as a string.

Try defining both variables as numircs by putting int( ) around them, i.e. int(variable-name) and see how that goes.

Good luck and let me know how it goes...

Bass

"The good thing about standards is that you have so many to choose from" Andy S. Tanenbaum
Reply


Messages In This Thread
RE: '>' not supported between instances of 'int' and 'str' - by Bass - Aug-27-2017, 01:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sort Function: <' not supported between instances of 'float' and 'tuple' quest 2 8,097 Apr-30-2021, 07:37 PM
Last Post: quest
Exclamation TypeError: '>=' not supported between instances of 'int' and 'str' helpme1 11 8,837 Mar-11-2021, 11:13 AM
Last Post: helpme1
  Type error: '>' not supported between instances of 'NoneType' and 'int' spalisetty06 1 10,492 Apr-29-2020, 06:41 AM
Last Post: buran
  TypeError: '<' not supported between instances of 'str' and 'int' Svensation 5 8,851 Jan-20-2020, 08:12 PM
Last Post: buran
  TypeError: Not supported between instances of 'function' and 'int' palladium 9 19,666 Dec-06-2019, 12:40 AM
Last Post: palladium
  TypeError: '>=' not supported between instances of 'str' and 'int' AsadZ 8 10,544 Aug-20-2019, 11:45 AM
Last Post: ThomasL
  '>' not supported between instances of 'str' and 'int' graham23s 2 4,000 May-11-2019, 07:09 PM
Last Post: micseydel
  Newbie Question re "TypeError: '<' not supported between instances of 'list' and 'int sr12 8 13,116 Apr-11-2019, 08:19 PM
Last Post: sr12
  '<' not supported between instances of 'str' and 'int' jayaherkar 1 7,956 Apr-09-2019, 03:25 PM
Last Post: perfringo
  TypeError: '<' not supported between instances of 'int' and 'builtin_function_or_meth yann2771 1 5,577 Mar-05-2019, 09:51 PM
Last Post: stranac

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020