title: Local variable 'body' referenced before assignment - Python - build_table
body: <p>Trying to send an email with Python build table. However, I'm experiencing the following error when I output the dataframe as a table. What is the issue here?</p>
  <pre><code>from pretty_html_table import build_table
  
  riskDataFrame  = pd.read_sql(query, sql_conn)   
  outputTable = build_table(riskDataFrame, 'blue_light')
  </code></pre>
  <p>Error is
  <strong>Unknown Error
  local variable 'body' referenced before assignment</strong></p>
  <p>File &quot;C:\Python-3.9\lib\site-packages\pretty_html_table\pretty_html_table.py&quot;, line 141, in build_table
  body = body + &quot;&quot;&quot;</p>&quot;&quot;&quot;
  UnboundLocalError: local variable 'body' referenced before assignment</p>