Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Daniel Carter](https://secure.gravatar.com/avatar/87d6a7b74e1c20b651f0a6fcf97ccccc?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Daniel Carter
19,991 PointsCSV File Issues
I have followed the instructions, and for some reason cannot access the csv file. Is there something I need to download in order for it to work?
1 Answer
![Daniel Carter](https://secure.gravatar.com/avatar/87d6a7b74e1c20b651f0a6fcf97ccccc?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Daniel Carter
19,991 PointsHey Kris,
Thanks for responding. I'm on a Mac.
I haven't had any problems with this code:
import os import pandas as pd
We use os.path.join because Windows uses a back slash () to separate directories
while others use a forward slash (/)
users_file_name = os.path.join('data', 'users.csv')
I get an error message with the next block of code:
Open the file and print out the first 5 lines
with open(users_file_name) as lines:
for _ in range(5):
# The file
object is an iterator, so just get the next line
print(next(lines))
![Ronak Bothra](https://secure.gravatar.com/avatar/20acc9ee18ea6cea5caa072220994abd?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ronak Bothra
818 Pointsdo you have a CSV file named 'users.csv'? if not then that might be the reason for the error.
KRIS NIKOLAISEN
54,969 PointsKRIS NIKOLAISEN
54,969 PointsCan you get this far with the file? Are you on a Mac or PC?