AttributeError: ‘module’ object has no attribute ‘reader’ [duplicate]

You imported a different csv module, not the one in the standard library. Perhaps you named your own script csv.py for example.

Find out what is imported instead by printing out the filename of the module:

import csv
print(csv.__file__)

If that’s not in the standard library, rename or delete this file, and remove the csv.pyc file if there is one next to it.

Leave a Comment