rubin-dp0 / Support

Submit Github Issues related to DP0
MIT License
1 stars 3 forks source link

Tap service errors #25

Closed ledwar04 closed 2 years ago

ledwar04 commented 2 years ago

Describe the bug The Tap service will not run (not even on tutorial notebooks, for example tutorial notebook #2)

To Reproduce Steps to reproduce the behavior:

  1. Go to tutorial notebook 'Intermediate TAP Queries for DP0 catalogs'
  2. Run the notebook until section 1.2 Schema discovery
  3. See error "DALServiceError: 401 Client Error: Unauthorized for url: https://data.lsst.cloud/api/tap/sync"

Expected behavior Normally this should run without errors.

Desktop (please complete the following information):

Additional context I first noticed this error while working on my own notebooks. I checked the tutorial notebooks, and indeed the same problem occurred. I erased my erased my tutorial-notebooks directory and re-'git'ed it, but still the same problems. Perhaps there has been a change to how we are supposed to be calling on the Tap from inside Jupyter notebooks?

MelissaGraham commented 2 years ago

Thanks for reporting this issue!

I attempted to recreate the issue, but the TAP service runs OK for me with tutorial-notebooks 1 and 2, with the most up-to-date versions and the recommended image Weekly 2021_49.

@ledwar04 does the issue persist for you, or was it maybe just temporary?

When I ran Section 1.2 of NB 02 just now, these are the same cells where you get that error? Screen Shot 2022-03-01 at 2 42 06 PM

ledwar04 commented 2 years ago

Thanks, Melissa!

Unfortunately, the issue still persists.

I double-checked and indeed am also running the Weekly 2021_49 versions. Neither tutorial notebook 1 nor 2 are working. Here's a longer version of the error message:


E19 Traceback (most recent call last) /opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/pyvo/dal/query.py in execute_votable(self, post) 241 try: --> 242 return votableparse(self.execute_stream(post=post).read) 243 except Exception as e:

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/astropy/utils/decorators.py in wrapper(*args, *kwargs) 535 --> 536 return function(args, **kwargs) 537

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/astropy/io/votable/table.py in parse(source, columns, invalid, verify, chunk_size, table_number, table_id, filename, unit_format, datatype_mapping, _debug_python_based_parser) 165 _debug_python_based_parser=_debug_python_based_parser) as iterator: --> 166 return tree.VOTableFile( 167 config=config, pos=(1, 1)).parse(iterator, config)

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/astropy/io/votable/tree.py in parse(self, iterator, config) 3600 else: -> 3601 vo_raise(E19, (), config, pos) 3602 config.update(self._get_version_checks())

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/astropy/io/votable/exceptions.py in vo_raise(exception_class, args, config, pos) 111 config = {} --> 112 raise exception_class(args, config, pos) 113

E19: None:1:0: E19: File does not appear to be a VOTABLE

During handling of the above exception, another exception occurred:

DALServiceError Traceback (most recent call last) /tmp/ipykernel_16457/4172518829.py in ----> 1 results = service.search("SELECT ra, dec, mag_g, mag_r, mag_i "\ 2 "FROM dp01_dc2_catalogs.object "\ 3 "WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 62.0, -37.0, 0.5)) = 1 ", maxrec=10) 4 results_tab = results.to_table() 5 results_tab

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/pyvo/dal/tap.py in run_sync(self, query, language, maxrec, uploads, keywords) 244 TAPResults 245 """ --> 246 return self.create_query( 247 query, language=language, maxrec=maxrec, uploads=uploads, 248 keywords).execute()

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/pyvo/dal/tap.py in execute(self) 940 for errors parsing the VOTable response 941 """ --> 942 return TAPResults(self.execute_votable(), url=self.queryurl, session=self._session) 943 944 def submit(self, post=False):

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/pyvo/dal/query.py in execute_votable(self, post) 242 return votableparse(self.execute_stream(post=post).read) 243 except Exception as e: --> 244 self.raise_if_error() 245 raise DALFormatError(e, self.queryurl) 246

/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.7.0/lib/python3.8/site-packages/pyvo/dal/query.py in raise_if_error(self) 251 if self._ex: 252 e = self._ex --> 253 raise DALServiceError.from_except(e, self.queryurl) 254 255 @property

DALServiceError: 401 Client Error: Unauthorized for url: https://data.lsst.cloud/api/tap/sync

MelissaGraham commented 2 years ago

Hmmm, OK, that error traceback looks like it's referring to the execution of the cell in Section 2.3 of NB 01 -- did the calls to service.search earlier in the notebook produce the same or similar error messages?

I'm not sure what the problem is, just trying to collect more information before bringing this to the attention of others.

ledwar04 commented 2 years ago

OK! Maybe it was temporary? I've just tried again, and now everything works. I logged out and back in (which I also did this morning...) but that seems to have cleared it up. Thanks! l.

MelissaGraham commented 2 years ago

Hmm, ok. I'll still bring it to the attention of the RSP team, just in case it's indicative of an underlying problem. I am going to close this issue, but, definitely report again if it happens again. Thanks Louise!