0

I am trying to run a simple CSV program in python(i am just a beginner).On running the program is shows "AttributeError: partially initialized module 'csv' has no attribute 'reader' (most likely due to a circular import)" the code is as follows

import csv
f=open("csv.csv",'r')
a=csv.reader(f)
print(a)

and the csv file that I have made is as follows:

""name,class,section
rakshith,12,science
aditya,12,science
haron,12,science""

Plz help!

3
  • 1
    Is there a file called csv.py in the current working directory? If so you must rename it, and delete any csv.pyc file too. Commented May 5, 2020 at 7:25
  • yeah i did that but it still didnt worked and i even changed the current working directory.I guess it a problem with python 3.8. Let us check another ide and i will post you Commented May 5, 2020 at 14:57
  • Ok let us know how the other IDE works out. Commented May 5, 2020 at 14:58

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.