i'm trying to connecting Pydrive to my Python Project but I got this
Traceback (most recent call last):
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauth2client\clientsecrets.py", line 121, in _loadfile
with open(filename, 'r') as fp:
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'client_secrets.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydrive\auth.py", line 386, in LoadClientConfigFile
client_type, client_info = clientsecrets.loadfile(client_config_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauth2client\clientsecrets.py", line 165, in loadfile
return _loadfile(filename)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauth2client\clientsecrets.py", line 124, in _loadfile
raise InvalidClientSecretsError('Error opening file', exc.filename,
oauth2client.clientsecrets.InvalidClientSecretsError: ('Error opening file', 'client_secrets.json', 'No such file or directory', 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\LENOVO\OneDrive\Desktop\Computational Neuroscience\Data\Data Science.py", line 4, in <module>
gauth.LocalWebserverAuth(client_secrets='client_secrets.json')
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydrive\auth.py", line 113, in _decorated
self.GetFlow()
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydrive\auth.py", line 443, in GetFlow
self.LoadClientConfig()
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydrive\auth.py", line 366, in LoadClientConfig
self.LoadClientConfigFile()
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydrive\auth.py", line 388, in LoadClientConfigFile
raise InvalidConfigError('Invalid client secrets file %s' % error)
pydrive.settings.InvalidConfigError: Invalid client secrets file ('Error opening file', 'client_secrets.json', 'No such file or directory', 2)
And That is my code
from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.LocalWebserverAuth(client_secrets='client_secrets.json')
It says that the file isn't in a directory yet but I've already put it in a directory