I am trying to make a discord bot change to online status I have been using pycharm and terminal. I have tried reordering the code multiple different ways, but here is what I have right now import discord from discord.ext import commands client = commands.Bot(command_prefix=".") @client.event async def on_ready(): print(‘Bot is ready.’) await client.run(bot token) ..
I have some env vars which should be loaded when the the specific func triggers, but when I run the main.py in Pycharm it does not work and gives the below error: ‘Error Message’: ‘the parameter apikey is invalid or missing’ I have exported the env var in terminal: $ export ALPHAVANTAGE_API_KEY=1qa2ws3ed4rf5t and checked the ..
In my Python class we are learning about multithreading and networks. Our textbook says "Because IDLE itself runs in a thread, it is not generally a good idea to test a multithreaded application in that environment." It suggests using the terminal. But what about using PyCharm’s "run" option? Does this run in a thread, like ..
I have been trying to figure out if there is some thing in discord.py or python that would reset a cooldown of a command if the command is returned. For example (as you can see below) someone types !math but if there is another command running, the command wont proceed and the user has to ..
I was doing a project on pycharm. I can’t get the filepath if I print ‘filename’ there. But I get in while in jupyter notebook. class module11(): def __init__(self, root): self.root = root self.root.title("Solution Sheet") global filename filename = filedialog.askopenfilename(initialdir=os.getcwd(), title="Select file", filetypes=(("jpeg images", "jpeg"), ("all files", "*.*"))) if not filename: return image = ImageTk.PhotoImage(Image.open(filename)) ..
When I use try/except and run it, it shows Process finished with exit code 0. I use it on main.py and every function except for try/except functions properly. import speech_recognition as sr listener = sr.Recognizer() try: with sr.Microphone() as source: print(‘listening..’) voice = listener.listen(source) command = listener.recognize_google(voice) print(command) except: pass Screen shot of the page ..
Traceback (most recent call last): File "C:Program FilesJetBrainsPyCharm Community Edition 2020.3.2pluginspython-cehelperspydevpydevconsole.py", line 5, in <module> from _pydev_comm.pydev_rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client File "C:Program FilesJetBrainsPyCharm Community Edition 2020.3.2pluginspython-cehelperspydev_pydev_commpydev_rpc.py", line 1, in <module> import socket File "C:UsersAgniva RoyPycharmProjectslibsocket.py", line 49, in <module> import _socket ImportError: DLL load failed while importing _socket: %1 is not a valid Win32 ..
I am developing with Riot watcher, And I got warning on PyCharm. I want to get matches that queue_id is 420, so I try this: match = lol_watcher.match.matchlist_by_account(region="kr", encrypted_account_id=accountid, queue=420) And when I run it, it seems like it is working well, but I’m not sure because there are so many outputs. And I can ..
I’m currently learning Django through ‘real python’ website and in the tutorial it asks to add an environmental variable in the terminal like this, (venv) $ export EMAIL_HOST_USER=your_email_host_user (for Linus or macOS) C:> set EMAIL_HOST_USER=your_email_host_user (for Windows) but I’m using PyCharm to code these and these doesn’t work in the terminal that PyCharm provides. How ..
When I import pygame, I get the above error message. When I pip install and pip3 install pygame in PyCharm, Sublime, and my computer terminal, I get this message: Requirement already satisfied: pygame in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (2.0.1) and yet I continuously get the error message when I try running a pygame program. How should I troubleshoot? ..