atom-community / atom-community/atom-script

Problem with Python 3 csv.reader when updated script package

Open
#1,638 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Hi, I get the following error after updating to new script. Not an issue in other (less-liked) IDEs:

Traceback (most recent call last):
File "", line 14, in
TypeError: 'newline' is an invalid keyword argument for this function
[Finished in 0.103s]

code is:

import csv

file_name = "/Users/RAhmed/RiceScriptingMOOC/Course4/isp_gdp_mini2.csv"

with open(file_name, newline='') as csvfile:
table = []
csvreader = csv.reader(csvfile, delimiter=',', quotechar='"')
for row in csvreader:
table.append(row)
print(table)

newline = '' is definitely in the Python documentation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.