diff --git a/astroquery/alma/core.py b/astroquery/alma/core.py index 67d9d2a469..4e8578e5e9 100644 --- a/astroquery/alma/core.py +++ b/astroquery/alma/core.py @@ -287,6 +287,9 @@ def stage_data(self, uids): timeout=self.TIMEOUT, cache=False) self._staging_log['initial_response'] = response log.debug("First response URL: {0}".format(response.url)) + if 'login' in response.url: + raise ValueError("You must login before downloading this data set.") + if response.status_code == 405: if hasattr(self, '_last_successful_staging_log'): log.warning("Error 405 received. If you have previously staged "