Hello, dear Psychopy users and coders!
How can I fix unicode error? ( ‘unicodeescape’ codec can’t decode bytes in position 2-3)
I have tried multiple ways mentioned in discussions, but it did not work.
This is part of the code:
import random
import pandas as pd
from psychopy import visual, event, core
Specify the file path of the Excel file
file_path = ‘C:\Users\USR\Desktop\thesis\third\experiment\sentences.xls’
Load the sentences from an Excel file
df = pd.read_excel(‘sentences.xls’, sheet_name=‘sheet1’)
sentences = df[‘sentences’].tolist()