title: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
body: <p>I have written the code below that provides the path to an Excel file that will be created with the XLWT module</p>
  
  <pre><code>master_path = r"C:\Users\nbt8ye8\Documents\Docs\Report Automation\KBE Reporting\Reports"
  master_excel_file_raw = "KBE Master Data.xls"
  master_excel_file = os.path.join(master_path, master_excel_file_raw)
  </code></pre>
  
  <p>Then later in the code I create the Excel file (which works without a problem) with the code below:</p>
  
  <pre><code>master_excel_wbook = xlwt.Workbook()
  master_excel_wsheet = master_excel_wbook.add_sheet("All Data", cell_overwrite_ok=True)
  master_excel_wbook.save(master_excel_file)
  master_excel_wbook.save(tempfile.TemporaryFile())
  </code></pre>
  
  <p>However when I run the code it gives me the errors below.</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Users\nbt8ye8\workspace\Report Automation\import_data.py", line 1225, in &lt;module&gt;
  createExcelFile()
  File "C:\Users\nbt8ye8\workspace\Report Automation\import_data.py", line 1219, in createExcelFile
  master_excel_wbook.save(master_excel_file)
  File "build\bdist.win32\egg\xlwt\Workbook.py", line 662, in save
  File "build\bdist.win32\egg\xlwt\Workbook.py", line 637, in get_biff_data
  File "build\bdist.win32\egg\xlwt\Workbook.py", line 599, in __sst_rec
  File "build\bdist.win32\egg\xlwt\BIFFRecords.py", line 76, in get_biff_record
  File "build\bdist.win32\egg\xlwt\BIFFRecords.py", line 91, in _add_to_sst
  File "build\bdist.win32\egg\xlwt\UnicodeUtils.py", line 50, in upack2
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
  </code></pre>
  
  <p>Does anyone know how to resolve this issue? I have tried encoding and decoding the strings and so far it has not worked but it is also highly likely I did not do it correctly. Any help would be greatly apprecieated. Thank you!</p>