This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hello! Thanks for reaching out to us about this, and apologies for the delayed response. This error is occurring as NCEI has slightly changed their THREDDS Data Server access URLs. If you update your `ncss` URL from '../thredds/ncss/grid/narr-a-files/..' to '../thredds/ncss/model-narr-a-files/..' you will regain access. I will be going through our training material and updating these incorrect URLs. We will hopefully also look into making these errors more helpful for Siphon users. However, your script will then run into a maskedarray+units issue resolved in our (more) up-to-date python-training page! We have archived this python-gallery and do not keep it up to date. We are currently exploring effective ways to communicate this to users who stumble across this older python-gallery. All you should need to do for your specific script to work is to change lines 99 and 100 EMSL = data.variables['Pressure_reduced_to_MSL_msl'][:] * units.Pa EMSL.ito('hPa') to EMSL = units.Quantity(data.variables['Pressure_reduced_to_MSL_msl'][:], units.Pa).to('hPa') and you should be good to go. Still, I strongly suggest checking out our currently maintained (though right now a little behind) python-training page at https://unidata.github.io/python-training/ with this specific example available as a notebook at https://unidata.github.io/python-training/gallery/hilo_symbol_plot/ I hope this helps, and feel free to reach out if there are any other issues. Thanks! All the best, Drew > Hi all, > > I tried to setup the example to plot MSLP. > I downloaded the example > > https://unidata.github.io/python-gallery/_downloads/191d328bde48c97aeb16e563101fee4d/HILO_Symbol_Plot.py > > ....but I struggle to load the data from NOAA with this error: > > /home/test/anaconda2/envs/pytroll/lib/python3.6/site-packages/distributed/config.py:20: > YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, > as the default Loader is unsafe. Please read https://msg.pyyaml.org/load > for full details. > defaults = yaml.load(f) > Traceback (most recent call last): > File "HILO_Symbol_Plot.py", line 77, in <module> > 'narr-a_221_{0:%Y%m%d}_{0:%H}00_000.grb'.format(dattim)) > File > "/home/test/anaconda2/envs/pytroll/lib/python3.6/site-packages/siphon/http_util.py", > line 379, in __init__ > self._get_metadata() > File > "/home/test/anaconda2/envs/pytroll/lib/python3.6/site-packages/siphon/ncss.py", > line 58, in _get_metadata > root = ET.fromstring(meta_xml) > File > "/home/test/anaconda2/envs/pytroll/lib/python3.6/xml/etree/ElementTree.py", > line 1315, in XML > return parser.close() > xml.etree.ElementTree.ParseError: no element found: line 1, column 0 > > Any idea howto fix this? > > Thanks in advance! > Ticket Details =================== Ticket ID: OTR-911008 Department: Support Python Priority: Low Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.