Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [56], in () 3 from alpha_vantage.timeseries import TimeSeries 5 ts = TimeSeries(key='NBAHRQ7MHFEGE3Y0', output_format='pandas') ----> 6 data

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [56], in () 3 from alpha_vantage.timeseries import TimeSeries 5 ts = TimeSeries(key='NBAHRQ7MHFEGE3Y0', output_format='pandas') ----> 6 data = ts.get_monthly_adjusted(symbol='^GSPC') File ~\anaconda3\lib\site-packages\alpha_vantage\alphavantage.py:218, in AlphaVantage._output_format.._format_wrapper(self, *args, **kwargs) 216 @wraps(func) 217 def _format_wrapper(self, *args, **kwargs): --> 218 call_response, data_key, meta_data_key = func( 219 self, *args, **kwargs) 220 if 'json' in self.output_format.lower() or 'pandas' \ 221 in self.output_format.lower(): 222 if data_key is not None: File ~\anaconda3\lib\site-packages\alpha_vantage\alphavantage.py:160, in AlphaVantage._call_api_on_func.._call_wrapper(self, *args, **kwargs) 158 else: 159 url = '{}{}'.format(url, apikey_parameter) --> 160 return self._handle_api_call(url), data_key, meta_data_key File ~\anaconda3\lib\site-packages\alpha_vantage\alphavantage.py:356, in AlphaVantage._handle_api_call(self, url) 354 json_response = response.json() 355 if not json_response: --> 356 raise ValueError( 357 'Error getting data from the api, no return was given.') 358 elif "Error Message" in json_response: 359 raise ValueError(json_response["Error Message"]) ValueError: Error getting data from the api, no return was given.

Why this error occurs and how to solve it? Thanks.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions