Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode error 'python zip2ws.py -i' #10

Open
Wake-Up-Donnie opened this issue Jan 3, 2020 · 1 comment
Open

Unicode error 'python zip2ws.py -i' #10

Wake-Up-Donnie opened this issue Jan 3, 2020 · 1 comment

Comments

@Wake-Up-Donnie
Copy link

Running 'python zip2ws.py -i' gives me these two warnings, I believe it is because of a unicode error in the address. Did anyone else get this?

Downloading 'http://federalgovernmentzipcodes.us/free-zipcode-database-Primary.csv'...
Downloading 'http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt'...
Downloading 'ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-history.csv'...
WARNING: Table stations already created
WARNING: Cannot insert row ==> ('UTQIA\xc4\xa0VIK FORMERLY BARROW 4 ENE', -0.156611, 0.0046, 2002080.8)

@gg314
Copy link

gg314 commented Apr 20, 2020

In Python 3, I was able to get things running by modifying zip2ws.py:

  1. In class Logger(), added def flush(self): pass.
  2. Removed decode("utf-8")
  3. reader.next() became next(reader) and files are now opened as r instead of rb

I get one warning while computing closest stations with -c but it does not seem to matter: Table closest already created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants