spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
570 stars 167 forks source link

OSError: [Errno 30] Read-only file system: '/path' #7741

Open xnaxe29 opened 1 year ago

xnaxe29 commented 1 year ago

While running JWST Detector1Pipeline from Python, it gives the error - "OSError: [Errno 30] Read-only file system: '/path'"

The error appears in both: Jupyter Notebook and Python command line within a terminal in both these commands -

  1. Using the run() method: default parameter values come from the pipeline itself ->detector1** = calwebb_detector1.Detector1Pipeline() ->run_output = detector1.run(uncal_file)

  2. Using the call() method: default parameter reference file retrieved from CRDS ->call_output = calwebb_detector1.Detector1Pipeline.call(uncal_file)

But there is no error when running directly from the terminal as -

  1. Use strun to call the pipeline and use all default parameter values: ->strun jwst.pipeline.Detector1Pipeline jw98765001001_01101_00003_nrcb5_uncal.fits

I could have tried to resolve the issue by giving the necessary permissions or checking the issue, but I am not sure what "/path" refers to.

Below, I give the complete run error for reference -

Command ->

Create an instance of the pipeline class ->detector1 = calwebb_detector1.Detector1Pipeline()

Set some parameters that pertain to the entire pipeline -> detector1.output_dir = output_dir -> detector1.save_results = True

Set some parameters that pertain to some of the individual steps -> detector1.refpix.use_side_ref_pixels = True -> detector1.linearity.save_results = True -> detector1.jump.rejection_threshold = 6

Specify the name of the trapsfilled file, which contains the state of the charge traps at the end of the preceding exposure -> detector1.persistence.input_trapsfilled = persist_file

Call the run() method -> run_output = detector1.run(uncal_file)

Terminal output ->

2023-07-19 16:28:29,243 - stpipe.Detector1Pipeline - INFO - Detector1Pipeline instance created. 2023-07-19 16:28:29,245 - stpipe.Detector1Pipeline.group_scale - INFO - GroupScaleStep instance created. 2023-07-19 16:28:29,246 - stpipe.Detector1Pipeline.dq_init - INFO - DQInitStep instance created. 2023-07-19 16:28:29,247 - stpipe.Detector1Pipeline.saturation - INFO - SaturationStep instance created. 2023-07-19 16:28:29,248 - stpipe.Detector1Pipeline.ipc - INFO - IPCStep instance created. 2023-07-19 16:28:29,249 - stpipe.Detector1Pipeline.superbias - INFO - SuperBiasStep instance created. 2023-07-19 16:28:29,250 - stpipe.Detector1Pipeline.refpix - INFO - RefPixStep instance created. 2023-07-19 16:28:29,252 - stpipe.Detector1Pipeline.rscd - INFO - RscdStep instance created. 2023-07-19 16:28:29,253 - stpipe.Detector1Pipeline.firstframe - INFO - FirstFrameStep instance created. 2023-07-19 16:28:29,254 - stpipe.Detector1Pipeline.lastframe - INFO - LastFrameStep instance created. 2023-07-19 16:28:29,255 - stpipe.Detector1Pipeline.linearity - INFO - LinearityStep instance created. 2023-07-19 16:28:29,256 - stpipe.Detector1Pipeline.dark_current - INFO - DarkCurrentStep instance created. 2023-07-19 16:28:29,257 - stpipe.Detector1Pipeline.reset - INFO - ResetStep instance created. 2023-07-19 16:28:29,258 - stpipe.Detector1Pipeline.persistence - INFO - PersistenceStep instance created. 2023-07-19 16:28:29,260 - stpipe.Detector1Pipeline.jump - INFO - JumpStep instance created. 2023-07-19 16:28:29,261 - stpipe.Detector1Pipeline.undersampling_correction - INFO - UndersamplingCorrectionStep instance created. 2023-07-19 16:28:29,262 - stpipe.Detector1Pipeline.ramp_fit - INFO - RampFitStep instance created. 2023-07-19 16:28:29,262 - stpipe.Detector1Pipeline.gain_scale - INFO - GainScaleStep instance created. 2023-07-19 16:28:29,342 - stpipe.Detector1Pipeline - INFO - Step Detector1Pipeline running with args ('jw98765001001_01101_00003_nrcb5_uncal.fits',). 2023-07-19 16:28:29,350 - stpipe.Detector1Pipeline - INFO - Step Detector1Pipeline parameters are: {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': './', 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': True, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'save_calibrated_ramp': False, 'steps': {'group_scale': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'dq_init': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'saturation': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'n_pix_grow_sat': 1}, 'ipc': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'superbias': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'refpix': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'odd_even_columns': True, 'use_side_ref_pixels': True, 'side_smoothing_length': 11, 'side_gain': 1.0, 'odd_even_rows': True}, 'rscd': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'type': 'baseline'}, 'firstframe': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'lastframe': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'linearity': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': True, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'dark_current': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'dark_output': None}, 'reset': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}, 'persistence': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'input_trapsfilled': 'jw98765001001_01101_00002_nrcb5_trapsfilled.fits', 'flag_pers_cutoff': 40.0, 'save_persistence': False, 'save_trapsfilled': True}, 'jump': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'rejection_threshold': 6, 'three_group_rejection_threshold': 6.0, 'four_group_rejection_threshold': 5.0, 'maximum_cores': 'none', 'flag_4_neighbors': True, 'max_jump_to_flag_neighbors': 1000.0, 'min_jump_to_flag_neighbors': 10.0, 'after_jump_flag_dn1': 0.0, 'after_jump_flag_time1': 0.0, 'after_jump_flag_dn2': 0.0, 'after_jump_flag_time2': 0.0, 'min_sat_area': 1.0, 'min_jump_area': 5.0, 'expand_factor': 2.0, 'use_ellipses': False, 'sat_required_snowball': True, 'min_sat_radius_extend': 2.5, 'sat_expand': 2, 'expand_large_events': False, 'find_showers': False, 'edge_size': 25, 'extend_snr_threshold': 1.2, 'extend_min_area': 90, 'extend_inner_radius': 1.0, 'extend_outer_radius': 2.6, 'extend_ellipse_expand_ratio': 1.1, 'time_masked_after_shower': 15.0, 'max_extended_radius': 200}, 'undersampling_correction': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': True, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'signal_threshold': 30000.0}, 'ramp_fit': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': '', 'int_name': '', 'save_opt': False, 'opt_name': '', 'suppress_one_group': True, 'maximum_cores': 'none'}, 'gain_scale': {'pre_hooks': [], 'post_hooks': [], 'output_file': None, 'output_dir': None, 'output_ext': '.fits', 'output_use_model': False, 'output_use_index': True, 'save_results': False, 'skip': False, 'suffix': None, 'search_output_file': True, 'input_dir': ''}}} ./ 2023-07-19 16:28:29,591 - stpipe.Detector1Pipeline - INFO - Prefetching reference files for dataset: 'jw98765001001_01101_00003_nrcb5_uncal.fits' reftypes = ['dark', 'gain', 'ipc', 'linearity', 'mask', 'persat', 'readnoise', 'refpix', 'reset', 'rscd', 'saturation', 'superbias', 'trapdensity', 'trappars'] 2023-07-19 16:28:29,595 - CRDS - INFO - Fetching /path/to/my/folder/mappings/jwst/jwst_system_datalvl_0002.rmap 694 bytes (1 / 183 files) (0 / 604.4 K bytes) Traceback (most recent call last): File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py", line 353, in local_bestrefs return hv_best_references(context, parameters, reftypes) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py", line 373, in hv_best_references ctx = get_symbolic_mapping(context_file, cached=True) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py", line 676, in get_symbolic_mapping return get_pickled_mapping( # reviewed File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 306, in call key, result = self._readonly(*args, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 293, in _readonly return key, self.uncached(args, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py", line 701, in get_pickled_mapping loaded = rmap.asmapping(mapping, cached=cached, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py", line 1684, in asmapping return get_cached_mapping(filename_or_mapping, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py", line 1611, in get_cached_mapping return _load_mapping(mapping, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 306, in call key, result = self._readonly(args, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 293, in _readonly return key, self.uncached(*args, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py", line 1662, in _load_mapping return cls.from_file(mapping, keys) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py", line 266, in from_file text = utils.get_uri_content(filename) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 737, in get_uri_content with open(uri, mode) as file: FileNotFoundError: [Errno 2] No such file or directory: '/path/to/my/folder/mappings/jwst/jwst_1100.pmap'

During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 652, in download utils.ensure_dir_exists(localpath) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 609, in ensure_dir_exists create_path(os.path.dirname(fullpath), mode) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py", line 600, in create_path os.mkdir(subdir, mode) OSError: [Errno 30] Read-only file system: '/path'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py", line 357, in local_bestrefs api.dump_mappings(context, ignore_cache=ignore_cache) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 778, in dump_mappings return dump_mappings3(*args, **keys)[0] File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 771, in dump_mappings3 return FileCacher(pipeline_context, ignore_cache, raise_exceptions).get_local_files(mappings) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 594, in get_local_files n_bytes = self.download_files(downloads, localpaths) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 634, in download_files self.download(name, path) File "/Users/adarshranjan/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py", line 656, in download raise CrdsDownloadError( crds.core.exceptions.CrdsDownloadError: Error fetching data for 'jwst_system_datalvl_0002.rmap' at CRDS server 'https://jwst-crds.stsci.edu' with mode 'http' : [Errno 30] Read-only file system: '/path'

FileNotFoundError Traceback (most recent call last) File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:353, in local_bestrefs(parameters, reftypes, context, ignore_cache) 352 # Finally do the best refs computation using pmap methods from local code. --> 353 return hv_best_references(context, parameters, reftypes) 354 except IOError as exc:

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:373, in hv_best_references(context_file, header, include, condition) 367 """Compute the best references for header for the given CRDS 368 context_file. This is a local computation using local rmaps and 369 CPU resources. If include is None, return results for all 370 filekinds appropriate to header, otherwise return only those 371 filekinds listed in include. 372 """ --> 373 ctx = get_symbolic_mapping(context_file, cached=True) 374 conditioned = utils.condition_header(header) if condition else header

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:676, in get_symbolic_mapping(mapping, observatory, cached, use_pickles, save_pickles, keys) 675 abs_mapping = translate_date_based_context(mapping, observatory) --> 676 return get_pickled_mapping( # reviewed 677 abs_mapping, cached=cached, use_pickles=use_pickles, save_pickles=save_pickles, keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:306, in CachedFunction.call(self, *args, keys) 303 """Compute or fetch func(*args, *keys). Add the result to the cache. 304 return func(args, keys) 305 """ --> 306 key, result = self._readonly(*args, **keys) 307 self.cache[key] = result

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:293, in CachedFunction._readonly(self, *args, *keys) 292 log.verbose("Uncached call", self.uncached.name, repr(key), verbosity=80) --> 293 return key, self.uncached(args, **keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:701, in get_pickled_mapping(mapping, cached, use_pickles, save_pickles, keys) 700 else: --> 701 loaded = rmap.asmapping(mapping, cached=cached, keys) 702 return loaded

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py:1684, in asmapping(filename_or_mapping, cached, keys) 1683 elif cached in [True, "cached"]: -> 1684 return get_cached_mapping(filename_or_mapping, keys) 1685 elif cached == "readonly":

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py:1611, in get_cached_mapping(mapping, keys) 1610 keys["loader"] = get_cached_mapping -> 1611 return _load_mapping(mapping, keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:306, in CachedFunction.call(self, *args, keys) 303 """Compute or fetch func(*args, *keys). Add the result to the cache. 304 return func(args, keys) 305 """ --> 306 key, result = self._readonly(*args, **keys) 307 self.cache[key] = result

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:293, in CachedFunction._readonly(self, *args, *keys) 292 log.verbose("Uncached call", self.uncached.name, repr(key), verbosity=80) --> 293 return key, self.uncached(args, **keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py:1662, in _load_mapping(mapping, keys) 1661 else: -> 1662 return cls.from_file(mapping, keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/rmap.py:266, in Mapping.from_file(cls, basename, *args, *keys) 265 filename = config.locate_mapping(basename) --> 266 text = utils.get_uri_content(filename) 267 return cls.from_string(text, basename, args, **keys)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:737, in get_uri_content(uri, mode) 736 mode = "r" if (mode=="text") else "rb" --> 737 with open(uri, mode) as file: 738 return file.read()

FileNotFoundError: [Errno 2] No such file or directory: '/path/to/my/folder/mappings/jwst/jwst_1100.pmap'

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last) File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:652, in FileCacher.download(self, name, localpath) 651 try: --> 652 utils.ensure_dir_exists(localpath) 653 return proxy.apply_with_retries(self.download_core, name, localpath)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:609, in ensure_dir_exists(fullpath, mode) 606 """Creates dirs from fullpath if they don't already exist. fullpath 607 is assumed to include a filename which will not be created. 608 """ --> 609 create_path(os.path.dirname(fullpath), mode)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/utils.py:600, in create_path(path, mode) 599 log.verbose("Creating", repr(subdir), "with permissions %o" % mode) --> 600 os.mkdir(subdir, mode) 601 with log.verbose_warning_on_exception( 602 "Failed chmod'ing new directory", repr(subdir), "to %o." % mode):

OSError: [Errno 30] Read-only file system: '/path'

The above exception was the direct cause of the following exception:

CrdsDownloadError Traceback (most recent call last) File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:357, in local_bestrefs(parameters, reftypes, context, ignore_cache) 356 try: --> 357 api.dump_mappings(context, ignore_cache=ignore_cache) 358 except CrdsError as exc:

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:778, in dump_mappings(*args, *keys) 774 """See dump_mappings3. 775 776 Returns { mapping_basename : mapping_local_filepath ... } 777 """ --> 778 return dump_mappings3(args, **keys)[0]

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:771, in dump_mappings3(pipeline_context, ignore_cache, mappings, raise_exceptions) 770 mappings = list(reversed(sorted(set(mappings)))) --> 771 return FileCacher(pipeline_context, ignore_cache, raise_exceptions).get_local_files(mappings)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:594, in FileCacher.get_local_files(self, names) 593 if downloads: --> 594 n_bytes = self.download_files(downloads, localpaths) 595 else:

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:634, in FileCacher.download_files(self, downloads, localpaths) 633 log.info(file_progress("Fetching", name, path, bytes, bytes_so_far, total_bytes, nth_file, total_files)) --> 634 self.download(name, path) 635 bytes_so_far += os.stat(path).st_size

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/client/api.py:656, in FileCacher.download(self, name, localpath) 655 self.remove_file(localpath) --> 656 raise CrdsDownloadError( 657 "Error fetching data for", srepr(name), 658 "at CRDS server", srepr(get_crds_server()), 659 "with mode", srepr(config.get_download_mode()), 660 ":", str(exc)) from exc 661 except: # mainly for control-c, catch it and throw it.

CrdsDownloadError: Error fetching data for 'jwst_system_datalvl_0002.rmap' at CRDS server 'https://jwst-crds.stsci.edu' with mode 'http' : [Errno 30] Read-only file system: '/path'

The above exception was the direct cause of the following exception:

CrdsDownloadError Traceback (most recent call last) Cell In[29], line 33 30 detector1.persistence.input_trapsfilled = persist_file 32 # Call the run() method ---> 33 run_output = detector1.run(uncal_file) 34 #'''

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/step.py:452, in Step.run(self, args) 450 else: 451 if self.prefetch_references: --> 452 self.prefetch(args) 453 try: 454 step_result = self.process(*args)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/step.py:569, in Step.prefetch(self, *args) 567 # prefetch truly occurs at the Pipeline (or subclass) level. 568 if len(args) and len(self.reference_file_types) and not self.skip: --> 569 self._precache_references(args[0])

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/pipeline.py:248, in Pipeline._precache_references(self, input_file) 245 try: 246 with self.open_model(input_file, asn_n_members=1, 247 asn_exptypes=["science"]) as model: --> 248 self._precache_references_opened(model) 249 except (ValueError, TypeError, IOError): 250 self.log.info( 251 'First argument {0} does not appear to be a ' 252 'model'.format(input_file))

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/pipeline.py:271, in Pipeline._precache_references_opened(self, model_or_container) 268 self._precache_references_opened(contained_model) 269 else: 270 # precache a single model object --> 271 self._precache_references_impl(model_or_container)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/pipeline.py:295, in Pipeline._precache_references_impl(self, model) 291 fetch_types = sorted(set(self.reference_file_types) - set(ovr_refs.keys())) 293 self.log.info("Prefetching reference files for dataset: " + repr(model.meta.filename) + 294 " reftypes = " + repr(fetch_types)) --> 295 crds_refs = crds_client.get_multiple_reference_paths(model.get_crds_parameters(), fetch_types, model.crds_observatory) 297 ref_path_map = dict(list(crds_refs.items()) + list(ovr_refs.items())) 299 for (reftype, refpath) in sorted(ref_path_map.items()):

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/crds_client.py:55, in get_multiple_reference_paths(parameters, reference_file_types, observatory) 52 raise TypeError("First argument must be a dict of parameters") 54 log.set_log_time(True) ---> 55 refpaths = _get_refpaths(parameters, tuple(reference_file_types), observatory) 56 return refpaths

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/stpipe/crds_client.py:68, in _get_refpaths(data_dict, reference_file_types, observatory) 66 return {} 67 with crds_cache_locking.get_cache_lock(): ---> 68 bestrefs = crds.getreferences( 69 data_dict, reftypes=reference_file_types, observatory=observatory) 70 refpaths = {filetype: filepath if "N/A" not in filepath.upper() else "N/A" 71 for (filetype, filepath) in bestrefs.items()} 72 return refpaths

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:122, in getreferences(parameters, reftypes, context, ignore_cache, observatory, fast) 81 def getreferences(parameters, reftypes=None, context=None, ignore_cache=False, 82 observatory="jwst", fast=False): 83 """ 84 This is the top-level get reference call for all of CRDS. Based on 85 parameters, getreferences() will download/cache the corresponding best (...) 120 cached reference file. 121 """ --> 122 final_context, bestrefs = _initial_recommendations("getreferences", 123 parameters, reftypes, context, ignore_cache, observatory, fast) 125 # Attempt to cache the recommended references, which unlike dump_mappings 126 # should work without network access if files are already cached. 127 best_refs_paths = api.cache_references( 128 final_context, bestrefs, ignore_cache=ignore_cache)

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:215, in _initial_recommendations(name, parameters, reftypes, context, ignore_cache, observatory, fast) 213 if mode == "local": 214 log.verbose("Computing best references locally.") --> 215 bestrefs = local_bestrefs( 216 parameters, reftypes=reftypes, context=final_context, ignore_cache=ignore_cache) 217 else: 218 log.verbose("Computing best references remotely.")

File ~/opt/anaconda3/envs/stenv/lib/python3.9/site-packages/crds/core/heavy_client.py:360, in local_bestrefs(parameters, reftypes, context, ignore_cache) 358 except CrdsError as exc: 359 traceback.print_exc() --> 360 raise CrdsDownloadError( 361 "Failed caching mapping files:", str(exc)) from exc 362 return hv_best_references(context, parameters, reftypes)

CrdsDownloadError: Failed caching mapping files: Error fetching data for 'jwst_system_datalvl_0002.rmap' at CRDS server 'https://jwst-crds.stsci.edu' with mode 'http' : [Errno 30] Read-only file system: '/path'

nden commented 1 year ago

Where is your CRDS_PATH variable pointing to? It needs to point to a directory to which you can write to.

export CRDS_PATH=<locally-accessable-path>/crds_cache/jwst_ops
export CRDS_SERVER_URL=https://jwst-crds.stsci.edu