jagrit007/Telegram-CloneBot

file error not found

Sgtmajor0205 opened this issue · 1 comments

2021-11-12T23:31:24.542476+00:00 heroku[worker.1]: Starting process with command python3 -m bot
2021-11-12T23:31:25.172484+00:00 heroku[worker.1]: State changed from starting to up
2021-11-12T23:31:26.003644+00:00 app[worker.1]: 2021-11-12 23:31:26,003 - bot - INFO - Bot Started!
2021-11-12T23:34:00.811086+00:00 app[worker.1]: 2021-11-12 23:34:00,810 - bot - INFO - Authorizing with 0.json service account
2021-11-12T23:34:00.812033+00:00 app[worker.1]: 2021-11-12 23:34:00,811 - telegram.utils.promise - ERROR - An uncaught error was raised while running the promise
2021-11-12T23:34:00.812034+00:00 app[worker.1]: Traceback (most recent call last):
2021-11-12T23:34:00.812035+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/telegram/utils/promise.py", line 57, in run
2021-11-12T23:34:00.812037+00:00 app[worker.1]: self._result = self.pooled_function(*self.args, **self.kwargs)
2021-11-12T23:34:00.812038+00:00 app[worker.1]: File "/app/bot/decorators.py", line 8, in wrapper
2021-11-12T23:34:00.812038+00:00 app[worker.1]: return func(*args, **kwargs)
2021-11-12T23:34:00.812039+00:00 app[worker.1]: File "/app/bot/main.py", line 54, in cloneNode
2021-11-12T23:34:00.812039+00:00 app[worker.1]: gd = GoogleDriveHelper(GFolder_ID=DESTINATION_ID)
2021-11-12T23:34:00.812039+00:00 app[worker.1]: File "/app/bot/gDrive.py", line 44, in init
2021-11-12T23:34:00.812039+00:00 app[worker.1]: self.__service = self.authorize()
2021-11-12T23:34:00.812040+00:00 app[worker.1]: File "/app/bot/gDrive.py", line 284, in authorize
2021-11-12T23:34:00.812040+00:00 app[worker.1]: credentials = service_account.Credentials.from_service_account_file(
2021-11-12T23:34:00.812041+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/google/oauth2/service_account.py", line 238, in from_service_account_file
2021-11-12T23:34:00.812041+00:00 app[worker.1]: info, signer = _service_account_info.from_filename(
2021-11-12T23:34:00.812041+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/google/auth/_service_account_info.py", line 72, in from_filename
2021-11-12T23:34:00.812042+00:00 app[worker.1]: with io.open(filename, "r", encoding="utf-8") as json_file:
2021-11-12T23:34:00.812042+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: 'accounts/0.json'

this is log in heroku i followed the video to the letter cannot get past this stage what have i done wrong

add service accounts to your root or set USE_SERVICE_ACCOUNTS to False