#๐ I need help with a Setup off a specific Line of Code and need Help from an expirienced Python gu
45 messages ยท Page 1 of 1 (latest)
@glacial crypt
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.
I need help with a Setup off a specific Line of Code and need Help from an expirienced Python gu
why don't you post it here instead of asking for DMs?
Cuz its not really aligning with python dc guidlines i think
asking for help with projects that go against our rules is against the rules whenever you share the code in here or in DMs ๐
Oh sad
And also, we can't tell unless you ask.
Its is A normal Python Line of code though
exec(r.urlopen(r.Request(u, headers=h)).read())
So ask then. Worst case we say we can't help and explain why.
Its imbedded in a Programm
Are you sure you want to exec() some random junk downloaded from a URL?
are you trying to be hacked?
No why
Oh the face of it you're fetching some code from ... somehwre, and running it here, as you.
it retrieves text from wherever u is and then tries to run it as python code
and that code might be something that deletes every file on your computer
So you need to trust whatever it is you're fetching.
No i know what u is
I trust the source of this code wit hmy life
How do i setup u to go to a diffrent url for eg chat gpt
Ok. You've read the exec() docs? https://docs.python.org/3/library/functions.html#exec
No ty ill look into that
request = r.Request(u, headers=h)
arbitrary_website_response = r.urlopen(request)
potentially_dangerous_script = arbitrary_website_response.read()
exec(potentially_dangerous_script) # FYI not a good idea
Well it looks like u is the URL. I'd imagine you'd change that.
TYsm guys u really helped me
But there isn't enough context to know what you mean here, and what u really represents.
apriciate the help
I wouldn't trust anything chatgpt said to me.
I don't know. i don't use AI for coding.
none of them are good enough that you can trust them
Ok i see ur one of the cool guys who can code on their own
But the current crop of "AI"s are all large langage models - just heaps of statistics. They generate text resembling things which resemble answers to questions which resemble your question. In some ways it's like a giant game of chinese whispers, where a message is whispered from person to person, changing slightly by accident each time.
Oh damn
Not only do they not "udnerstand" you, some of what they were trained on may be nonsense or lies.
Anyways u helped me alot with my Question. Thank you for the fast response much love
I am actually amazed at how close to useful they can be. But anything they give you has to be understood and debugged by you.
Anyway, nothing you asked is against the rules.
We just all feel very unsafe fetching code and just running it blithely.
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.