Python Forum

Full Version: TypeError: 'Group' object is not callable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...
I just observe that you overwrite built-in function filter()