jdat_notebooks icon indicating copy to clipboard operation
jdat_notebooks copied to clipboard

Issue on SOSS NIRISS nb

Open wardhoward opened this issue 2 years ago • 1 comments

I installed (apparently successfully) and tried running the notebook 'soss-transit-spectroscopy' and successfully made it to line exposure = datamodels.SpecModel('calibrated_data_hatp1_transit.fits') where wavelength solutions are applied. It directed to a non-existing STScI website and failed:
http://stsci.edu/schemas/jwst_datamodel/spec.schema

Traceback below -- thanks for the help!


FileNotFoundError Traceback (most recent call last) in ----> 1 exposure = datamodels.SpecModel('calibrated_data_hatp1_transit.fits') 2 3 # Get number of rows and columns on the first integration: 4 rows,columns = data[0,:,:].shape 5

~/anaconda3/lib/python3.7/site-packages/jwst/datamodels/model_base.py in init(self, init, schema, memmap, pass_invalid_values, strict_validation, ignore_missing_extensions, **kwargs) 113 schema = asdf_schema.load_schema(self.schema_url, 114 resolver=asdf_file.resolver, --> 115 resolve_references=True) 116 117 self._schema = mschema.merge_property_trees(schema)

~/anaconda3/lib/python3.7/site-packages/asdf/schema.py in load_schema(url, resolver, resolve_references, resolve_local_refs) 433 # the same object is treacherous, because users who mutate the result will not 434 # expect that they're changing the schema everywhere. --> 435 return copy.deepcopy(_load_schema_cached(url, resolver, resolve_references, resolve_local_refs)) 436 437

~/anaconda3/lib/python3.7/site-packages/asdf/schema.py in _load_schema_cached(url, resolver, resolve_references, resolve_local_refs) 480 def _load_schema_cached(url, resolver, resolve_references, resolve_local_refs): 481 loader = _make_schema_loader(resolver) --> 482 schema, url = loader(url) 483 484 if resolve_references or resolve_local_refs:

~/anaconda3/lib/python3.7/site-packages/asdf/schema.py in load_schema(url) 357 # If not, this must be a URL (or missing). Fall back to fetching 358 # the schema the old way: --> 359 return _load_schema(url) 360 361 return load_schema

~/anaconda3/lib/python3.7/site-packages/asdf/schema.py in _load_schema(url) 321 def _load_schema(url): 322 if url.startswith("http://") or url.startswith("https://") or url.startswith("asdf://"): --> 323 raise FileNotFoundError("Unable to fetch schema from non-file URL: " + url) 324 325 with generic_io.get_file(url) as fd:

FileNotFoundError: Unable to fetch schema from non-file URL: http://stsci.edu/schemas/jwst_datamodel/spec.schema

wardhoward avatar Dec 02 '22 22:12 wardhoward

Hi @wardhoward, This is likely caused by a mismatch between the stcal package and other packages. I see in the requirements file that the pipeline is pinned to an old version. Can you try to upgrade the pipeline to the latest release? You can do so by running pip install jwst --upgrade in the same environment you created for this notebook. Let me know if this works!

camipacifici avatar Dec 07 '22 04:12 camipacifici

This has not been touched in a long time. @wardhoward please open another ticket if you still see problems. Thank you!

camipacifici avatar Jul 11 '24 13:07 camipacifici