Python Forum
TypeError: 'Group' object is not callable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: 'Group' object is not callable
#1
Hello everyone!
I am trying to compute filtered fluxes in wall-bounded turbulence. For that, I have defined some functions which compute the filtered field and then I have defined another function which computes the eFlux. In order to do the whole thing, the code reads the data for various snapshots and then perform the whole operation and save an output file. The problem is that my code is performing the whole task only for one snapshot and when the loop goes on to the second snapshot, the filter functions are running fine but I am getting a TypeError in the eFlux function.

Error:
TypeError: 'Group' object is not callable
I am posting a snippet of my code so that you don't have to bother yourself too much.

def filter(a,b,c):
  d=a+b*c
  return d

def eFlux(q,w,e,r,t):
  pi = q+w+e+r+t
  return pi

for iFile in iFiles:

  # read the file
  # call filter function (working fine even for the second snapshot)
  x = filter(a1,b1,c1)
  # so on.. I am not writing the whole code  
  #
  # now the problem starts
  #------------------------
  # call the eFlux function
  # this function is working only for one File 
  # when the loop goes to the other file then
  # I get the TypeError:
  #------------------------
  # File "efluxBox.py", line 239, in <module>
  # pi = eflux(u_rF, u_thF, u_zF, u_rRF, u_rThF, u_rZF, u_thThF, u_thZF, u_zZF, r, th, z)
  # TypeError: 'Group' object is not callable
  #-----------------------
  # The above error is from the original code
  h = eFlux(y,x,c,v,b)  
  #------------------------
  #Save output

I got the error...
Reply
#2
I just observe that you overwrite built-in function filter()
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: cannot pickle ‘_asyncio.Future’ object Abdul_Rafey 1 378 Mar-07-2024, 03:40 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 502 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Bug TypeError: 'NoneType' object is not subscriptable TheLummen 4 738 Nov-27-2023, 11:34 AM
Last Post: TheLummen
  TypeError: 'NoneType' object is not callable akbarza 4 986 Aug-24-2023, 05:14 PM
Last Post: snippsat
  [NEW CODER] TypeError: Object is not callable iwantyoursec 5 1,343 Aug-23-2023, 06:21 PM
Last Post: deanhystad
  Need help with 'str' object is not callable error. Fare 4 825 Jul-23-2023, 02:25 PM
Last Post: Fare
  TypeError: 'float' object is not callable #1 isdito2001 1 1,074 Jan-21-2023, 12:43 AM
Last Post: Yoriz
  TypeError: a bytes-like object is required ZeroX 13 4,087 Jan-07-2023, 07:02 PM
Last Post: deanhystad
  'SSHClient' object is not callable 3lnyn0 1 1,166 Dec-15-2022, 03:40 AM
Last Post: deanhystad
  TypeError: 'float' object is not callable TimofeyKolpakov 3 1,436 Dec-04-2022, 04:58 PM
Last Post: TimofeyKolpakov

Forum Jump:

User Panel Messages

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