Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - sample code doesn't work #33

Open
ScottWeinstein opened this issue May 8, 2019 · 1 comment
Open

BUG - sample code doesn't work #33

ScottWeinstein opened this issue May 8, 2019 · 1 comment

Comments

@ScottWeinstein
Copy link
Contributor

> python .\sample.py
Traceback (most recent call last):
  File ".\sample.py", line 17, in <module>
    coverage = weather.get_coverage(weather)  # GS-specific functionality
  File "C:\Users\scott\AppData\Roaming\Python\Python37\site-packages\gs_quant\data\dataset.py", line 234, in get_coverage
    fields=fields
  File "C:\Users\scott\AppData\Roaming\Python\Python37\site-packages\gs_quant\api\gs\data.py", line 137, in get_coverage
    body = GsSession.current._get('/data/{}/coverage'.format(dataset_id), payload=params)
  File "C:\Users\scott\AppData\Roaming\Python\Python37\site-packages\gs_quant\session.py", line 165, in _get

    return self.__request('GET', path, payload=payload, cls=cls, include_version=include_version)
  File "C:\Users\scott\AppData\Roaming\Python\Python37\site-packages\gs_quant\session.py", line 140, in __request
    raise MqRequestError(response.status_code, response.text, context='{} {}'.format(method, url))
gs_quant.errors.MqRequestError: context: GET https://api.marquee.gs.com/v1/data/WEATHER/coverage
status: 400, message: {"statusCode":400,"reasonPhrase":"Bad Request","title":"Path/Query Parameter Validation Error","messages":["Failed validation of request path and/or query parameters: [ECMA 262 regex \"^[\\d]{1,256}$\" does not match input string \"<gs_quant.data.dataset.Dataset object at 0x000002061B96F6D8>\"]"]}

@notanaveragelifter
Copy link

You are not providing correct data to the get_coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants