Home>
Thing I want to do

・ I want to read the authentication key from a file instead of writing it solidly.
・ Read the csv file from google drive into google colab and put it in a variable.

Premise

No error occurs in solid writing

CK ='hogehoge'
What i did

Load the csv file from google drive into google colab and put it in a variable

df_auth = pd.read_csv ('/content/drive/hoge/twitter_dev_keys.csv')
def auth ():
    CK = df_auth ['CK'] [0]
    CS = df_auth ['CK'] [0]
    AT = df_auth ['AT'] [0]
    AS = df_auth ['AS'] [0]
Error message

TweepError: [{'code': 32,'message':'Could not authenticate you.'}]

All variable values ​​are the same as solid writing

type (df_auth ['CK'] [0])->str
print (df_auth ['CK'] [0])->hogehoge (same value as solid writing)

Str ()ing the variable didn't work either. What should I do now?