Do I know any python experts 👀
I’m on a python code error hampster wheel… and I’ve been troubleshooting for over 4 hours.
Halp 🫨
#asknostr
Do I know any python experts 👀
I’m on a python code error hampster wheel… and I’ve been troubleshooting for over 4 hours.
Halp 🫨
#asknostr
I can maybe help. I know the python.
+1
🙏🏼 😲 any thoughts or recommendations would be greatly appreciated. I’m new so I’m sure it’s something I overlooked or didn’t think of…
this is everything ive done and attempted in the last several hours: I was trying to set up a telegram bot integrating chat gpt though openAI API -
1. Setting Up a Telegram Bot:
- Created a new bot on Telegram using BotFather.
- Obtained a bot token from BotFather.
2. Setting Up a Server:
- Set up a server on AWS for running the bot code.
3. Installing Libraries:
- Installed the required libraries (`python-telegram-bot` and openai`) using `pip.
4. Writing Bot Code:
- Created a Python script for the Telegram bot.
- Integrated the OpenAI API for ChatGPT.
5. Running the Bot Code:
- Opened a command line interface (CLI).
- Navigated to the correct directory using the cd command.
- Ran the Python script using the python command.
6. Troubleshooting:
- Checked for errors in the CLI output.
- Verified the directory path to the script.
- Ensured correct library installation.
- Checked for typos in the Python code.
- Investigated library version compatibility.
- Ran the script as a separate file, not in the interactive shell.
- Used a proper Python script structure for the bot.
These steps cover the processes I've taken so far of setting up and troubleshooting a Telegram bot integrated with ChatGPT using the OpenAI API… what am I missing???
nostr:npub14qt30q0an6gwmcl2gnwu5hf6h7pgl68wm6c082asm5l9vdtzu87q0z9htj TY 🙏🏼 😲☀️ see above my response to Jay
Do you see an error traceback on screen? If so, what does it say?

Looks like you are missing a required parameter when you instantiate the Updater class
I checked to make sure my import statement in the Python script was correct when I got the Updater error - and then would get the Filters error, so then I made sure the library has been updated and the Filters class wasn’t moved or renamed and then checked the library documentation for my version to ensure I’m following the correct way to import Filters..
I’m stumped 😂😫
I either get this error or this one -
I have redone the code like 9 times, and did all three above trouble shooting 
Just found this discussion
Downgrading the telegram bot library may solve the issue
Here on reddit someone sais:
“According to the documentation, you need to instantiate an asyncio.Queue and pass it to the telegram.ext.Updater constructor as the second positional argument.”
https://www.reddit.com/r/learnpython/comments/13o3n2e/cant_make_a_telegram_bot/
😲😲 ok - Let me see how to go about this.
You've done a lot, but we'd need to know the actual error you get when you run your bot code or try to use it. You only listed out the general steps you've taken, so there could many problems at any of the steps. As a rule of thumb, you'll need to get every individual part working on its own before you try to link them together.
That means validating the telegram and openai apis separately, making sure they both work. Then going in and linking them up to build the bot.
🙏🏼👀 thank you will check this out