We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19b87fc commit 37bcb33Copy full SHA for 37bcb33
1 file changed
ckanext/recombinant/write_excel.py
@@ -250,15 +250,15 @@ def estimate_width_from_length(length):
250
range2 * ESTIMATE_WIDTH_MULTIPLE_2)
251
252
def estimate_width(text):
253
- return max(estimate_width_from_length(len(s)) for s in text.split('\n'))
+ return max(estimate_width_from_length(len(s)) for s in str(text).split('\n'))
254
255
def wrap_text_to_width(text, width):
256
# assuming width > ESTIMATE_WIDTH_MULTIPLE_1_CHARS
257
width -= ESTIMATE_WIDTH_MULTIPLE_1_CHARS * ESTIMATE_WIDTH_MULTIPLE_1
258
cwidth = width // ESTIMATE_WIDTH_MULTIPLE_2 + ESTIMATE_WIDTH_MULTIPLE_1_CHARS
259
return '\n'.join(
260
'\n'.join(textwrap.wrap(line, cwidth))
261
- for line in text.split('\n'))
+ for line in str(text).split('\n'))
262
263
264
def _build_styles(book, geno):
0 commit comments