Open ocean001 opened 6 years ago
Hi @ocean001, there's a json
file that should be available to you (from Gmail) that contains the auth details. You need to control the location of that file via export GAW_CLIENT_SECRET_FILE_PATH=<path-to-client-secret-json-file>
. Set the variable GAW_CLIENT_SECRET_FILE_PATH
to the location of that secret json file. If you're unable to set the variable, just rename the client.json
file to gmail-api-wrapper-py.json
Thanks for quick reply. I set up the GAW_CLIENT_SECRET_FILE_PATH, I will try the rename the client.json to see what will happen. It is good to have your wrapper. Thanks.
Thank you. Let me know when you get stuck.
Thanks, @yoda-yoda , I did not get the expected results. Looks like the script run, and no results returned. I used under: Window 2012 server, and Anaconda, Python 3.6. Probably there is some problems with my environments. Thanks for your help.
If you are having any errors I recommend trying it in python 2.7.15, one I tried it in, then make sure you follow the exporting of variables by creating a virtual env and then activating it and then exporting those. It will definitely make your life a lot easier. I also had a credentials path of .credentials/gmail-api-wrapper-py.json and it worked like a charm.
I did the second test on the read, error: C:\Anaconda3\python.exe C:/Users/liumin/PycharmProjects/StockA/GmailWrapperRead.py C:\Anaconda3\lib\site-packages\oauth2client_helpers.py:255: UserWarning: Cannot access C:\Users\name.credentials\gmail-api-wrapper-py.json: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
It did open a browser, but still gave me an final error after the above error: ==noauth_local_webserver (it popped up an login page, I login, webpage showed authorization success)