Skip to content

UnicodeDecodeError: 'ascii' codec can't decode byte 0x85 in position 297464: ordinal not in range(128) - METAR Plotting #3085

Closed Answered by dopplershift
edrewitz asked this question in Q&A
Discussion options

You must be logged in to vote

A few notes:

  1. Yes, the latin-1 encoding should be fine, the only difference from ascii will be for characters >127, which shouldn't really be present. For at least one case I just found in the data, though, I think utf-8 seems to produce slightly better results. I'm not really sure what's going on, other than some random junk is creeping into the data flow.
  2. These data files are now available on https://thredds.ucar.edu (our production server), so I'd recommend using that rather than our test server
  3. There's actually a direct way with remote_open() and Siphon to get what you want without manually using StringIO.
from datetime import datetime, time

from siphon.catalog import TDSCatalog

dt1 =

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dopplershift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants