Skip to content Skip to sidebar Skip to footer

Cannot Resolve AttributeError: 'module' Object Has No Attribute 'calcKappa'

I'm completely new to python. Now i'm using Enthought canopy (python 2.7.3). I know this question has been asked a million times before and i can imagine you all are tired of this

Solution 1:

global c
global lamb
global pi
global kappa
global mu
global sumofkappa
global f

Those lines don't do what you think they do. global is a keyword that is place within a function to reference the global declaration of a variable.

e.g.

x = 42
def without_global():
    x = 9
    print(x)

def with_global():
    global x
    x = 13
    print(x)

print(x)
without_global()
print(x)
with_global()
print(x)

I get entirely different issues here, though.


Post a Comment for "Cannot Resolve AttributeError: 'module' Object Has No Attribute 'calcKappa'"