#๐Ÿ”’ New to PY making a Finance/ bugeter issues

46 messages ยท Page 1 of 1 (latest)

queen zealotBOT
#

@dire comet

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

#

Please react with โœ… to upload your file(s) to our paste bin, which is more accessible for some users.

dire comet
#

my discord webhook wont work and how could i make a remote way to create temp logins witha set expirey date?

vocal bane
dire comet
#

how??

#

never realised webhookos share that?

#

that will be fine wont it

vocal bane
#

Anyone can technically send stuff to your webhook with that link. Probably best not to share it here

dire comet
#

yeah

vocal bane
#

I'm not too well versed in discord bots, but I imagine you would need some sort of db file to keep track of logins

#

it's up to you how you want the user to "sign in"

#

they could DM your bot

dire comet
#

ile just leave that part out for now then

#

my requests are apparently noy installed

#

when they are

#

re installed checked the location yet same error

vocal bane
#

it's likely a venv issue

dire comet
#

whats that

vocal bane
#

Virtual environment. Did you set one up for your project?

#

!venv

queen zealotBOT
#
Virtual environments

Virtual environments are isolated Python environments, which make it easier to keep your system clean and manage dependencies. By default, when activated, only libraries and scripts installed in the virtual environment are accessible, preventing cross-project dependency conflicts, and allowing easy isolation of requirements.

To create a new virtual environment, you can use the standard library venv module: python3 -m venv .venv (replace python3 with python or py on Windows)

Then, to activate the new virtual environment:

Windows (PowerShell): .venv\Scripts\Activate.ps1
or (Command Prompt): .venv\Scripts\activate.bat
MacOS / Linux (Bash): source .venv/bin/activate

Packages can then be installed to the virtual environment using pip, as normal.

For more information, take a read of the documentation. If you run code through your editor, check its documentation on how to make it use your virtual environment. For example, see the VSCode or PyCharm docs.

Tools such as poetry and pipenv can manage the creation of virtual environments as well as project dependencies, making packaging and installing your project easier.

Note: When using PowerShell in Windows, you may need to change the execution policy first. This is only required once per user:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
dire comet
#

never heard of this

vocal bane
#

if you're fairly new to python, I'd recommend some of the basics before jumping into something as complex as a bot

dire comet
#

its not a bot

#

just a webhook

vocal bane
#

ahh sorry

dire comet
#

that will notify me when i get a login in the interface

vocal bane
#

sorry I thought you wanted users to sign in with a bot or something

dire comet
#

no i should of been more clear sorry

#

this is what it is

dire comet
vocal bane
#

Did you click the link above for working with venv in vsc?

#

I don't work with vsc so I don't really know those specifics

dire comet
#

is there any py speficic AI sites that could help which are free?

vocal bane
#

I wouldn't touch AI

#

especially as a beginner

dire comet
#

right okay

vocal bane
#

Do you understand what a virtual environment is now?

dire comet
#

im 99% sure half is AI just copied it off my freind since he was wanting me to learn how to "brake down code and see how it functions"

dire comet
vocal bane
queen zealotBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.