Skip to content


BF: Builder can't open condition file when non-ASCII characters are i…
Browse files Browse the repository at this point in the history
…ncluded in the file path in Python2.
  • Loading branch information
hsogo committed Dec 6, 2017
1 parent 4d4d1fc commit 32204a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions psychopy/data/
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ def pandasToDictList(dataframe):
with open(fileName, 'rU') as fileUniv:
# use pandas reader, which can handle commas in fields, etc
trialsArr = pd.read_csv(fileUniv, encoding='utf-8')
logging.debug("Read csv file with pandas: {}".format(fileName))
logging.debug(u"Read csv file with pandas: {}".format(fileName))
trialList, fieldNames = pandasToDictList(trialsArr)

elif fileName.endswith(('.xlsx','.xls')) and haveXlrd:
trialsArr = pd.read_excel(fileName)
logging.debug("Read excel file with pandas: {}".format(fileName))
logging.debug(u"Read excel file with pandas: {}".format(fileName))
trialList, fieldNames = pandasToDictList(trialsArr)

elif fileName.endswith('.xlsx'):
Expand All @@ -288,7 +288,7 @@ def pandasToDictList(dataframe):
wb = load_workbook(filename=fileName, data_only=True)
ws = wb.worksheets[0]

logging.debug("Read excel file with openpyxl: {}".format(fileName))
logging.debug(u"Read excel file with openpyxl: {}".format(fileName))
# in new openpyxl (2.3.4+) get_highest_xx is deprecated
nCols = ws.max_column
Expand Down

0 comments on commit 32204a2

Please sign in to comment.