Dash callback weird error

#Callback for dropdown menu
@app.callback(dash.dependencies.Output('Categories', 'value'),[dash.dependencies.Input('Categories', 'options')])
def update_output_dropdown(value):
    return 'You have selected "{}"'.format(value)


#Callback for submitting everything.
@app.callback(Output('graph', 'figure'), Input('graph-with-button', 'n_clicks'), Input('Categories', 'value'))
def callback(n_clicks, value):
    if (n_clicks != 0):
         return calculation(n_clicks, value)

ctx = dash.callback_context
def calculation(n_clicks,value):
        if os.path.exists(UPLOAD_DIRECTORY):
            for file in uploaded_files():
                dfs = pd.read_excel(file, sheet_name=value)
                if  value == 'Spikes (Oct 23)':
                    # Define if we analyzing Premium or Cut Spikes
                    # Define if the data is reliable 
                    #Code here
app.layout = html.Div(
 #Drop Down Menu for the categories. 
        id = 'Categories',
            {'label': 'Spikes (Oct 23)', 'value': 'Spikes'},
            {'label': 'Fasteners', 'value': 'Fasteners'},
            {'label': 'Ballast Level', 'value': 'Ballast Level'},
            {'label': 'Spikes Med', 'value': 'Spikes'},
            {'label': 'Fasteners Med', 'value': 'Fasteners'},
            {'label': 'Ballast Level Med', 'value': 'Ballast Level'},
            {'label': 'Spikes Bad', 'value': 'Spikes'},
            {'label': 'Fasteners Bad', 'value': 'Fasteners'},
            {'label': 'Ballast Level Bad', 'value': 'Ballast Level'}
        placeholder="Select a category",
        value = "Spikes"
    #html.Div(id='dd-output-container', children = []),

    #Enter button Event to trigger app callback for dropdown and upload data to submit what to calculate.
    html.Button('Submit',id='submit', n_clicks=0),

    id = 'graph'
I get an error that says: Cannot read property 'layout' of null
Here is the Traceback. It is just pure gibberish. 

(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser’s console.)
TypeError: Cannot read property ‘layout’ of null

at t.value (

at t.value (

at callComponentWillReceiveProps (

at updateClassInstance (

at updateClassComponent (

at beginWork (

at HTMLUnknownElement.callCallback (

at Object.invokeGuardedCallbackDev (

at invokeGuardedCallback (

at beginWork$1 (

Could it be because of my n_clicks? I am not sure. Does anyone have any clues?