Skip to content

data release None no longer supported by the Marvin API #810

@aglaze

Description

@aglaze

I'm getting an error when trying to access Maps through remote access. When calling something like
maps = marvin.tools.Maps('1-626684')
I get the following error message and traceback:

---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/brain/api/api.py:201, in BrainInteraction._checkResponse(self, response)
    200 try:
--> 201     isbad = response.raise_for_status()
    202 except requests.HTTPError as http:

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
   1020 if http_error_msg:
-> 1021     raise HTTPError(http_error_msg, response=self)

HTTPError: 409 Client Error: CONFLICT for url: https://magrathea.sdss.org/marvin/api/maps/8983-12705/HYB10/MILESHC-MASTARSSP/

During handling of the above exception, another exception occurred:

BrainError                                Traceback (most recent call last)
File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/tools/maps.py:378, in Maps._load_maps_from_api(self)
    377 try:
--> 378     response = self._toolInteraction(url_full)
    379 except Exception as ee:

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/tools/core.py:134, in MarvinToolsClass._toolInteraction(self, url, params)
    133 params = params or {'release': self._release}
--> 134 return marvin.api.api.Interaction(url, params=params)

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/brain/api/api.py:57, in BrainInteraction.__init__(self, route, params, request_type, auth, timeout, headers, stream, datastream, send, base, verify)
     56 if self.url and send:
---> 57     self._sendRequest(request_type)
     58 elif not self.url and send:

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/brain/api/api.py:302, in BrainInteraction._sendRequest(self, request_type)
    300 else:
    301     # Check the response if it's good
--> 302     self._checkResponse(self._response)

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/brain/api/api.py:242, in BrainInteraction._checkResponse(self, response)
    241             errmsg = '{0}'.format(err)
--> 242         raise BrainError('Requests Http Status Error: {0}\n{1}'.format(http, errmsg))
    243 else:
    244     # Not bad

BrainError: Requests Http Status Error: 409 Client Error: CONFLICT for url: https://magrathea.sdss.org/marvin/api/maps/8983-12705/HYB10/MILESHC-MASTARSSP/
Error: data release None no longer supported by the Marvin API. Update to a later MPL or use Marvin's local file access mode instead.

During handling of the above exception, another exception occurred:

MarvinError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 maps = marvin.tools.Maps('1-626684')

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/tools/maps.py:113, in Maps.__init__(self, input, filename, mangaid, plateifu, mode, data, release, drpall, download, nsa_source, bintype, template, template_kin)
    111     self._load_maps_from_db(data=self.data)
    112 elif self.data_origin == 'api':
--> 113     self._load_maps_from_api()
    114 else:
    115     raise marvin.core.exceptions.MarvinError(
    116         'data_origin={0} is not valid'.format(self.data_origin))

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/tools/maps.py:380, in Maps._load_maps_from_api(self)
    378     response = self._toolInteraction(url_full)
    379 except Exception as ee:
--> 380     raise marvin.core.exceptions.MarvinError(
    381         'found a problem when checking if remote maps exists: {0}'.format(str(ee)))
    383 data = response.getData()
    385 if self.plateifu not in data['plateifu']:

MarvinError: found a problem when checking if remote maps exists: Requests Http Status Error: 409 Client Error: CONFLICT for url: https://magrathea.sdss.org/marvin/api/maps/8983-12705/HYB10/MILESHC-MASTARSSP/
Error: data release None no longer supported by the Marvin API. Update to a later MPL or use Marvin's local file access mode instead.
You can submit this error to Marvin GitHub Issues (https://github.com/sdss/marvin/issues/new).
Fill out a subject and some text describing the error that just occurred.
If able, copy and paste the full traceback information into the issue as well.

I don't have a default release set, so it normally gets set automatically to DR17. When I try to set my release to MPL-11, I get the following error and traceback:

---------------------------------------------------------------------------
NoSectionError                            Traceback (most recent call last)
Cell In[4], line 2
      1 marvin.config.access='collab'
----> 2 marvin.config.setRelease('MPL-11')

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/__init__.py:489, in MarvinConfig.setRelease(self, version)
    486     version = self._get_latest_release()
    488 version = version.upper()
--> 489 self.release = version

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/__init__.py:283, in MarvinConfig.release(self, value)
    281 # set the new release and possibly replant the tree
    282 with self._replant_tree(value) as val:
--> 283     self._release = val
    285 # set the access path if needed and set initial drpall and dapall paths
    286 if not hasattr(self, '_path'):

File ~/anaconda3/envs/marvin/lib/python3.8/contextlib.py:120, in _GeneratorContextManager.__exit__(self, type, value, traceback)
    118 if type is None:
    119     try:
--> 120         next(self.gen)
    121     except StopIteration:
    122         return False

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/marvin/__init__.py:727, in MarvinConfig._replant_tree(self, value)
    725 if is_different and not nullinit:
    726     if (relchange and self.access == 'collab') or stilldr or topublic or tocollab:
--> 727         self._tree.replant_tree(tree_config)
    728         self._path = Path(tree_config)
    730 # switch the API url depending on release

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/tree/tree.py:484, in Tree.replant_tree(self, config, exclude, preserve_envvars)
    481 # reinitialize a new Tree with a new config and
    482 # automatically overwrite any existing envvars
    483 config = 'sdsswork' if not config else config
--> 484 self.__init__(key=self._keys, config=config, update=True, exclude=exclude)
    486 # look for any preserved envvars from the configuration file
    487 if not preserve_envvars:

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/tree/tree.py:98, in Tree.__init__(self, config, key, uproot_with, update, exclude, product_root, git)
     95 self.load_config()
     97 # create the environment
---> 98 self.branch_out(limb=key)
    100 # add the paths to the os.environ
    101 if key is not None:

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/tree/tree.py:376, in Tree.branch_out(self, limb)
    373     limbs.extend(limb)
    375 # add all limbs into the tree environ
--> 376 self.environ = self._create_environment(sections=limbs)
    378 # add all paths into the tree paths dictionary
    379 self.paths = self._create_paths()

File ~/anaconda3/envs/marvin/lib/python3.8/site-packages/tree/tree.py:307, in Tree._create_environment(self, cfg, sections)
    305 section = section if section in cfg.sections() else section.upper()
    306 environ[section] = OrderedDict()
--> 307 options = cfg.options(section)
    309 for opt in options:
    310     if opt in environ['default']:

File ~/anaconda3/envs/marvin/lib/python3.8/configparser.py:675, in RawConfigParser.options(self, section)
    673     opts = self._sections[section].copy()
    674 except KeyError:
--> 675     raise NoSectionError(section) from None
    676 opts.update(self._defaults)
    677 return list(opts.keys())

NoSectionError: No section: 'MANGA'

Any help with either of these issues would be appreciated!

Desktop (please complete the following information):

  • OS: Linux, 5.10.16.3-microsoft-standard-WSL2
  • Version of Marvin: 2.8.0

Additional context
I didn't have any problem running the same code a few weeks ago, but couldn't find anything that would indicate updates to marvin. I tried doing a new install of marvin and that didn't change the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions