All Apps and Add-ons

Problems with utf-8

gpburgett
Splunk Employee
Splunk Employee

I'm trying to export some data with Korean characters, but when I click to export I get a txt file with the following trace:

Unrecoverable error in the server.
Traceback (most recent call last):
  File "/Users/notgary/Splunk/Sites/XX_splunk/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 163, in next
    chunk = self.iter_response.next()
  File "<string>", line 189, in generate_from_stream
  File "/Users/notgary/Splunk/Sites/XX_splunk/etc/apps/excel_export/bin/xlwt/Worksheet.py", line 1003, in write
    self.row(r).write(c, label, style)
  File "/Users/notgary/Splunk/Sites/XX_splunk/etc/apps/excel_export/bin/xlwt/Row.py", line 231, in write
    StrCell(self.__idx, col, style_index, self.__parent_wb.add_str(label))
  File "/Users/notgary/Splunk/Sites/XX_splunk/etc/apps/excel_export/bin/xlwt/Row.py", line 150, in insert_cell
    raise Exception(msg)
Exception: Attempt to overwrite cell: sheetname=u'splunk_results' rowx=0 colx=0

Everything works fine when everything is English. I'm going to keep trying, but please let me know if you have any ideas about what might be going wrong. Thanks.

1 Solution

araitz
Splunk Employee
Splunk Employee

This was just a lame error on my part. In appserver/controllers/excel.py, this:

186         # write the header
187         for field in fieldNames:
188             result_sheet.write(0,i,field)
189         i = i + 1

should be this (notice the indent):

186         # write the header
187         for field in fieldNames:
188             result_sheet.write(0,i,field)
189             i = i + 1

The fixed version is available on Splunkbase right now (version 1.1.1). You can also just make the above change (add 4 spaces on line 189) and then restart Splunk to get the same result.

View solution in original post

0 Karma

araitz
Splunk Employee
Splunk Employee

This was just a lame error on my part. In appserver/controllers/excel.py, this:

186         # write the header
187         for field in fieldNames:
188             result_sheet.write(0,i,field)
189         i = i + 1

should be this (notice the indent):

186         # write the header
187         for field in fieldNames:
188             result_sheet.write(0,i,field)
189             i = i + 1

The fixed version is available on Splunkbase right now (version 1.1.1). You can also just make the above change (add 4 spaces on line 189) and then restart Splunk to get the same result.

0 Karma

araitz
Splunk Employee
Splunk Employee

I made a few more tweaks in 1.2 which is available today.

0 Karma

araitz
Splunk Employee
Splunk Employee

EDIT: see answer below, my initial suspicions were off.

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...