Namedtuples: TypeError: 'str' object is not callable
rosuav at gmail.com
Fri Jan 6 23:04:42 EST 2017
On Sat, Jan 7, 2017 at 2:46 PM, Deborah Swanson
<python at deborahswanson.net> wrote:
> And here's the Traceback in PyCharm:
> File "E:/Coding projects/Pycharm/Moving/moving_numberedtuples.py",
> line 139, in moving()
> for lst in map(listings._make, csv.reader(open('E:\\Coding
> projects\\Pycharm\\Moving\\Moving 2017 in.csv',"r"))):
> TypeError: 'str' object is not callable
> What str object is not callable, and how do I fix it?
Toss in a 'print' above that. You're calling map and open (and
csv.reader, but I doubt you've shadowed that). My money would be on
'map' having been assigned something.
More information about the Python-list