I have a Python script here that is for figuring out the dimensions of a work space to then figure out where the automation script should be clicking or inputting data.

I am running into a problem with a variable have made in one function but isn't accessible in another. I returned the variable I'd like to continue working with through the script but it is giving me an error saying it has not been defined.

Here is my code thus far :

```
import pyautogui
import time
import finder

def areaSetup():
    getWorkSpace('img/dimen/loginDimTop.png' , 'img/dimen/loginDimBot.png')
    getWaHWorkSpace(workSpace)
    getQuad1(workSpace,W, H, Hh, Wh)
    getQuad2(workSpace,W, H, Hh, Wh)
    getQuad3(workSpace,W, H, Hh, Wh)
    getQuad4(workSpace,W, H, Hh, Wh)
    return workSpace, quad1, quad2, quad3, quad4

def getWorkSpace(browTopLeft, browBotRight):
    top = pyautogui.locateOnScreen( browTopLeft , grayscale=True)
    print (top)
    bottom = pyautogui.locateOnScreen( browBotRight , grayscale=True)
    print (bottom)
    x1, y1, h1, w1 = top
    x2, y2, h2, w2 = bottom
    x2 = x2+w2
    y2 = y2+h2
    print ("initial print" , x1, y1, x2, y2)
    workSpace = x1, y1, x2, y2
    print ("Workspace" , workSpace)
    return workSpace

def getWaHWorkSpace(workSpace):
    x1, y1, x2, y2 = workSpace #break it into four parts again
    W = x2 - x1 #get the height
    H = y2 - y1 #get the width
    Hh = 0.5 * H #get mid point of height
    Wh = 0.5 * W #get mid point of width
    print ("W and H" , W, H, Hh, Wh)
    return W, H, Hh, Wh

```

My traceback is the following : 

```
(14, 40, 42, 47)
(694, 774, 342, 44)
initial print 14 40 738 1116
Workspace (14, 40, 738, 1116)
Traceback (most recent call last):
File "loginPage_001.py", line 35, in <module>
areaDimensions.areaSetup()
File "/home/tvorac/python/testBot/areaDimensions.py", line 7, in areaSetup
getWaHWorkSpace(workSpace)
NameError: name 'workSpace' is not defined

```

I am fairly sure I am overlooking something simple and will continue looking through the Python documentation to see if I can catch what I am doing wrong.

Thank you for your time regarding this!