AttributeError                            Traceback (most recent call last)
<ipython-input-1-2b6855960796> in <module>

     15 csvFile = open(search_key+".csv","a+",newline="",encoding="utf-8")
---> 16 csvWriter = csv.Writer(csvFile)
     17 c = []
     18 i = []

AttributeError: module 'csv' has no attribute 'Writer'

Help🙏🙏

Recommended Answers

All 3 Replies

I don’t know python so this is completely a stab in the dark, but what if you do lowercase writer() instead of Writer()?

Definitely a case problem. Use csv.writer (lowercase). You'd have seen this if you were using an intellisense capable editor. Even idle would have pointed this out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.