#๐Ÿ”’ Prob

37 messages ยท Page 1 of 1 (latest)

indigo bluff
#

Hi, how i resolve this please

spark pantherBOT
#

@indigo bluff

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.

autumn urchin
# indigo bluff Hi, how i resolve this please

hi
you should share your code cause it's hard to guess but the error says name 'pyperclip' is not defined
So i think there are two possible errors but i'm not sure which one is this but you will quickly be able to understand

  • either you forgot to import the module so you would need to add a import pyperclip at the start of your code
  • either you forgot to install the module then you would need to do pip install pyperclip in your terminal

https://pypi.org/project/pyperclip/ check this for the pip installation if you don't want to pip install without checking before

-# Btw hello fellow frenchie

indigo bluff
#

there is my code

#

import hashlib
import os, platform
import pyperclip

def get_hwid():
node = os.getenv("computername") + platform.processor() + os.getenv("SystemDrive")
hwid = hashlib.sha256(node.encode()).hexdigest()
return hwid

Main program

if name == "main":
hwid = get_hwid()

pyperclip.copy(hwid)

print("Your HWID has been copied to the clipboard.")

input("Please press Enter to close the window...")
#

???

#
import hashlib
import os, platform
import pyperclip 

def get_hwid():
    node = os.getenv("computername") + platform.processor() + os.getenv("SystemDrive")
    hwid = hashlib.sha256(node.encode()).hexdigest()
    return hwid

# Main program
if __name__ == "__main__":
    hwid = get_hwid()

    pyperclip.copy(hwid)

    print("Your HWID has been copied to the clipboard.")

    input("Please press Enter to close the window...")
#

there is

#

the code

autumn urchin
#

yea better

#

then if you've done both i can't help you unfortunately idk why it says pyperclip is not defined

indigo bluff
autumn urchin
#

oh new error

indigo bluff
#

wait

#

i do for see

#

i translate you message

indigo bluff
#

see this

#

i thnik i have to refresh and go to zero

autumn urchin
#

yea idk why it's talking about __init__ i'm not skilled enough
good luck ๐Ÿซก

indigo bluff
#

@autumn urchin

#

the top is the line 3

autumn urchin
#

no module called {something} to me the only way to fix this is to pip install the module

indigo bluff
#

i install

autumn urchin
#

strange

indigo bluff
#

very lol

spark pantherBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.