Skip to content

Commit 32204a2

Browse files
committed
BF: Builder can't open condition file when non-ASCII characters are included in the file path in Python2.
1 parent 4d4d1fc commit 32204a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

psychopy/data/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ def pandasToDictList(dataframe):
268268
with open(fileName, 'rU') as fileUniv:
269269
# use pandas reader, which can handle commas in fields, etc
270270
trialsArr = pd.read_csv(fileUniv, encoding='utf-8')
271-
logging.debug("Read csv file with pandas: {}".format(fileName))
271+
logging.debug(u"Read csv file with pandas: {}".format(fileName))
272272
trialList, fieldNames = pandasToDictList(trialsArr)
273273

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

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

291-
logging.debug("Read excel file with openpyxl: {}".format(fileName))
291+
logging.debug(u"Read excel file with openpyxl: {}".format(fileName))
292292
try:
293293
# in new openpyxl (2.3.4+) get_highest_xx is deprecated
294294
nCols = ws.max_column

0 commit comments

Comments
 (0)