Open agy-why opened 1 year ago
def _escape_cell(self, cell, mask_cell=None):
if mask_cell:
return 'NULL'
else:
if type(cell) == str:
# chars need to be decoded
value = cell.decode()
elif cell.dtype.char == 'S':
# chars need to be decoded
value = cell.decode()
elif cell.dtype.char == '?':
# booleans need to be converted to 0 or 1, or quoting will fail
value = 1 if cell else 0
else:
value = cell
return self.escape_string(value)
When a field is of type
char
the upload process breaks here: https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/core/adapter/database/base.py#L338This is due to the fact that
parse_single_table
fromastropy
readschar
fields as built-instring
and not asnumpy._str
, which leads to nodtype
attribute.