#๐ ModuleNotFound problem
114 messages ยท Page 1 of 1 (latest)
@daring girder
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.
Share traceback please
!traceback looks like this
Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.
A full traceback could look like:
Traceback (most recent call last):
File "my_file.py", line 5, in <module>
add_three("6")
File "my_file.py", line 2, in add_three
a = num + 3
~~~~^~~
TypeError: can only concatenate str (not "int") to str
If the traceback is long, use our pastebin.
what do i put in the terminal
If you run your script, you see those error messages
Can you copy and paste them here please?
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Use the pastebin ๐
Odd
in documents?
How did you run your script?
when im gonna run it
i press python debug thing
also when it dosent work it sends this
@fleet prawn
Can you share what you're trying to run?
I dont think ive ever seen this runpy or debugpy
Send a screenshot of the entire thing
Including vscode
Paste it here btw
Send screenshot with the error anyways
with what error
With this error
the weird thing is that a different code gives the same error
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import random
import time```
it starts with this
I agree. This lil code shouldn't throw an error. Please send screenshot of your VScode
Or
If you named your script as main.py
Try typing py main.py
In your terminal
And hit enter
C:\Users\danci\AppData\Local\Programs\Python\Python312\python.exe: can't open file 'C:\Users\danci\main.py': [Errno 2] No such file or directory
What is your scripts name?
What is the name of file for this code?
also
"c:\Users\danci\AppData\Local\Programs\Python\Python312\Lib\random.py" is overriding the stdlib module "random"
Then
py code_run.py
C:\Users\danci\AppData\Local\Programs\Python\Python312\python.exe: can't open file 'C:\Users\danci\code_run.py': [Errno 2] No such file or directory
Rรฉpertoireย : C:\Users\danci
Mode LastWriteTime Length Name
d----- 21/04/2024 23:04 .cache
d----- 22/04/2024 10:07 .vscode
d-r--- 16/12/2023 04:05 Contacts
d----- 26/07/2023 16:37 Documents
d-r--- 22/04/2024 10:05 Downloads
d-r--- 16/12/2023 04:05 Favorites
d-r--- 16/12/2023 04:05 Links
d-r--- 21/01/2024 20:26 Music
dar--l 23/04/2024 10:41 OneDrive
d-r--- 16/12/2023 04:05 Saved Games
d-r--- 16/12/2023 04:05 Searches
d-r--- 16/12/2023 04:05 Videos
-a---- 01/03/2024 09:17 126 .gitconfig
Share a screenshot
of?
Your screen of vscode
of what tho
Entire screen pls
the first thing is the code i sent u
I think they are looking for the vscode screen where the folder structure is visible on the left, terminal is visible on the bottom and the bottom info bar is entirely visible
Maybe thats the problem. Your theme is so bright, its attracting bugs ๐คช
Omg bro
And what happens if you save the file, then hit play in top right corner?
Joking joking ๐งก
Run python file?
BRO I NEVER HAD PYTHON INSTALLED FROM THE MICROSOFT STORE
IS THAT THE PROBLEM?
@versed otter
I did install form python org
I fixed it
@versed otter
@fleet prawn
How do i know its really working tho
what do i put in terminal
Eeuhm.
print("Hello World")?
or.
import time
print(time.now())
I think thats a thing in any case
no?
it dont work
Okay so
Import random seems to work now
Butt
it says overriding the stdlib module random
okay
So
Does it work now?
Can you do shift contorl P
Then type: python select interpreter and show a screenshot of the options after you click that?
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.