Проблема: я пытаюсь запустить скрипт оболочки, который содержит python скрипт из Debian Linux env, который работает правильно, но когда я вызываю его через crontab, он выдает мне ошибку ниже.
ошибка
Traceback (most recent call last):
File "/home/samsunguk/env/lib/python3.5/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 "/home/samsunguk/env/lib/python3.5/site-packages/pydrive/auth.py", line 386, in LoadClientConfigFile
client_type, client_info = clientsecrets.loadfile(client_config_file)
File "/home/samsunguk/env/lib/python3.5/site-packages/oauth2client/clientsecrets.py", line 165, in loadfile
return _loadfile(filename)
File "/home/samsunguk/env/lib/python3.5/site-packages/oauth2client/clientsecrets.py", line 125, in _loadfile
exc.strerror, exc.errno)
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 "/home/samsunguk/segmentTrendsandTraits/segmentTrend.py", line 193, in <module>
extract_data(60, "csv_output_all_data_segments_BAAAM.csv", "output_data_segments_Last60days.csv", "output_data_segments_Last60days.xlsx")
File "/home/samsunguk/segmentTrendsandTraits/segmentTrend.py", line 185, in extract_data
gauth.LocalWebserverAuth()
File "/home/samsunguk/env/lib/python3.5/site-packages/pydrive/auth.py", line 113, in _decorated
self.GetFlow()
File "/home/samsunguk/env/lib/python3.5/site-packages/pydrive/auth.py", line 443, in GetFlow
self.LoadClientConfig()
File "/home/samsunguk/env/lib/python3.5/site-packages/pydrive/auth.py", line 366, in LoadClientConfig
self.LoadClientConfigFile()
File "/home/samsunguk/env/lib/python3.5/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)
Мой python сценарий имеет учетные данные для авторизации Google.
Кто-нибудь может мне помочь, почему я получаю эту ошибку?