CodeWithAloha / Hawaii-Zoning-Atlas

Interactive map showing how outdated zoning laws make it hard to build diverse, affordable housing in Hawaii.
https://hawaiizoningatlas.com
MIT License
22 stars 11 forks source link

Correctly handle new lines in CSV validation script #121

Closed MichaelTamaki closed 6 months ago

MichaelTamaki commented 6 months ago

Correctly handle new lines in CSV validation script

Attempting to fix Github Action errors found where the CSV file new lines are not interpreted correctly.

If newline='' is not specified, newlines embedded inside quoted fields will not be interpreted correctly, and on platforms that use \r\n linendings on write an extra \r will be added. It should always be safe to specify newline='', since the csv module does its own (universal) newline handling. https://docs.python.org/3/library/csv.html#csv.reader

We see that in the Google spreadsheet, there are some values that have new lines values in them.

Example failed run: https://github.com/CodeWithAloha/Hawaii-Zoning-Atlas/actions/runs/8231035064

MichaelTamaki commented 6 months ago

Closing -- This might not have been the correct problem