#๐Ÿ”’ Can't find the csv file

39 messages ยท Page 1 of 1 (latest)

wispy topazBOT
#

@stoic turret

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.

cunning nebula
#

Do you have an error message?

stoic turret
#

no

cunning nebula
#

Where did you last see your csv file?

stoic turret
#

im not sure what you mean

tall patio
#

Maybe add some context? Your original post got deleted

stoic turret
#

ok i'll make a new post

tall patio
#

you can keep using this one.

#

To make a new post, you have to close this one anyway, and it will stay unlocked as long as it stays active

stoic turret
#

idk how to paste my code onto discord

tall patio
#

!paste

wispy topazBOT
#
Pasting large amounts of code

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.

cunning nebula
#

!paste

tall patio
#

!code

wispy topazBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

tall patio
#

use the paste service if your code is long

stoic turret
tall patio
#

And it keeps saying "CSV file ... not found."?

stoic turret
#

yeah

tall patio
#

right click on the file on your desktop and click "Copy as path"

grave mist
#
file_path = 'C:/Users/nickt/OneDrive/Desktop/python/kaiser.csv'
file_path = 'kaiser.csv'  

you probably want the first one, and to change the forward slashes to back slashes

#

you'd also want to put an r in front of the open quote-- r' '

tall patio
#

he's using forward slash, so it should be fine

stoic turret
#

i did what you said and now im getting this error

#

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

tall patio
#

it means you're using \User without a r-string

stoic turret
#

it still says csvl file ... not found

tall patio
#

Are you setting file_path twice still?

stoic turret
#

yeah, should i get rid of one

tall patio
#

Pop quiz. What is the output of this script? ```py
name = "John Cena"
name = "Dwayne Johnson"
print(name)

stoic turret
#

i see

tall patio
#

(I use wrestler names to be relevant with the kids)

stoic turret
#

alright thank you

grave mist
west furnace
#

The Rock retired in like 2004-2005

wispy topazBOT
#
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.