m1guelpf / chatgpt-telegram

Run your own GPTChat Telegram bot, with a single command!
MIT License
3.89k stars 560 forks source link

issue on second run #2

Closed jcstein closed 1 year ago

jcstein commented 1 year ago

The first time I ran on M2 Mac, binary ran fine and I was able to log in on Chromium. After I logged in it closed out. I DMd the bot, but it did not successfully reply.

I ran the process over again, with a new bot, and then ran into this error.

Screenshot 2022-12-04 at 1 22 57 AM

What would you advise? Thank you for building this useful tool!

m1guelpf commented 1 year ago

Make sure you've copied the included env.example file to .env, and added the required variables (see README).

jcstein commented 1 year ago

It's there and in the right directory 🤔

jcstein commented 1 year ago
jcs @ ~/chatgpt-telegram-Darwin-arm64 % ls -al
total 15728
drwx------@  7 joshstein  staff      224 Dec  4 01:45 .
drwxr-x---+ 66 joshstein  staff     2112 Dec  4 01:46 ..
-rw-r--r--@  1 joshstein  staff       85 Dec  4 01:45 .env
-rw-r--r--   1 joshstein  staff     1069 Dec  3 23:55 LICENSE
-rw-r--r--   1 joshstein  staff      742 Dec  3 23:55 README.md
-rwxr-xr-x@  1 joshstein  staff  8035394 Dec  3 23:55 chatgpt-telegram
-rw-r--r--   1 joshstein  staff       29 Dec  3 23:55 env.example
jcs @ ~/chatgpt-telegram-Darwin-arm64 % cat .env
TELEGRAM_ID=<my-telegram-ID>
TELEGRAM_TOKEN=<my-bot-token>

and the error is still:

/Users/joshstein/chatgpt-telegram-Darwin-arm64/chatgpt-telegram ; exit;         
jcs @ ~ % /Users/joshstein/chatgpt-telegram-Darwin-arm64/chatgpt-telegram ; exit;
2022/12/04 01:48:41 Started ChatGPT
2022/12/04 01:48:41 Couldn't load .env file: open .env: no such file or directory

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

and

jcs @ ~ % sudo /Users/joshstein/chatgpt-telegram-Darwin-arm64/chatgpt-telegram
Password:
2022/12/04 01:52:23 Started ChatGPT
2022/12/04 01:52:23 Couldn't load .env file: open .env: no such file or directory
m1guelpf commented 1 year ago

hmm, that's very weird, works fine for me 🤔

jcstein commented 1 year ago

odd, ran it in terminal in VS code vs. iTerm or terminal and it worked

205478824-1790c922-48b1-4287-ade4-6391eac39ec3