You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a standard Python 2 unicode-vs-string issue. It prevents the main script from working with Python 2 for the convert command because (a) from __future__ import unicode_literals is used in main.py, and (b) the convert command has a default selector defined. To reproduce:
$ python2 -m delphin.main convert <<< "[ ]"
Rather than ensure that the convert command passes a string, a more robust fix would let itsdb.get_data_specifier() to work with unicode or (byte) string objects.
The text was updated successfully, but these errors were encountered:
itsdb.get_data_specifier() calls itsdb._split_cols() which has this line (which is the heart of the problem):
returnlist(map(str.strip, colstring.split('@')))
str refers to different types in Python2 and Python3, so str.strip() may not work with unicode objects in Python2 or bytes objects in Python3. Rather than specify str.strip you can rely on duck-typing to ignore the difference and strip spaces no matter what type each column value is.
This is a standard Python 2 unicode-vs-string issue. It prevents the main script from working with Python 2 for the
convert
command because (a)from __future__ import unicode_literals
is used inmain.py
, and (b) theconvert
command has a default selector defined. To reproduce:Rather than ensure that the
convert
command passes a string, a more robust fix would letitsdb.get_data_specifier()
to work with unicode or (byte) string objects.The text was updated successfully, but these errors were encountered: