Skip to content

Setting configuration values from the dictionary returned by astropy.config.get_config fails #1567

@mwcraig

Description

@mwcraig

If I try setting a configuration value at run time like this:

from astropy.config import get_config
items = get_config('astropy.utils.data')
items['dataurl'].set('http://astropydata.mywebsite.com')

it fails with:

ERROR: AttributeError: 'str' object has no attribute 'set' [IPython.core.interactiveshell]

in both 0.2.4 and 0.3.dev5708.

Setting the configuration using the other method described in the documentation works:

from astropy.utils.data import DATAURL
DATAURL.set('http://astropydata.mywebsite.com')

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