You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~\AppData\Roaming\Python\Python38\site-packages\ElexonDataPortal\dev\utils.py:85, in parse_xml_response(r)
83 df = pd.DataFrame(pd.Series(data_content)).T
84 else:
---> 85 raise ValueError('The returned data_content must be one of: list or OrderedDict')
87 return df
ValueError: The returned data_content must be one of: list or OrderedDict
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
I'm getting the below error when trying to call the imbalance volumes API. Below is the stack trace any ideas on how to get around this?
#Aggregated Imbalance Volumes
df_B1780 = client.get_B1780(start_date, end_date)
df_B1780.head(3
ValueError Traceback (most recent call last)
c:\Users\Admin\OneDrive\Desktop\esda_work\dissertation\bm_forcasting\data_processing.ipynb Cell 11' in
1 #Day-ahead Aggregated Generation
----> 2 df_B1430 = client.get_B1430(start_date, end_date)
3 df_B1430.head(3)
File ~\AppData\Roaming\Python\Python38\site-packages\ElexonDataPortal\api.py:469, in Client.get_B1430(self, start_date, end_date)
456 def get_B1430(
457 self,
458 start_date: str='2020-01-01',
459 end_date: str='2020-01-01 1:30',
460 ):
461 """
462 Day-Ahead Aggregated Generation
463
(...)
466 end_date (str)
467 """
--> 469 df = orchestrator.query_orchestrator(
470 method='get_B1430',
471 api_key=self.api_key,
472 n_attempts=self.n_retry_attempts,
473 request_type='SP_and_date',
474 kwargs_map={'date': 'SettlementDate', 'SP': 'Period'},
475 func_params=['APIKey', 'date', 'SP', 'ServiceType'],
476 start_date=start_date,
477 end_date=end_date,
478 )
480 return df
File ~\AppData\Roaming\Python\Python38\site-packages\ElexonDataPortal\dev\orchestrator.py:411, in query_orchestrator(method, api_key, request_type, kwargs_map, func_params, start_date, end_date, n_attempts, **kwargs)
408 assert request_type in request_type_to_func.keys(), f"{request_type} must be one of: {', '.join(request_type_to_func.keys())}"
409 request_func = request_type_to_func[request_type]
--> 411 df = request_func(
412 method=method,
413 api_key=api_key,
414 n_attempts=n_attempts,
415 **kwargs
416 )
418 df = df.reset_index(drop=True)
420 return df
File ~\AppData\Roaming\Python\Python38\site-packages\ElexonDataPortal\dev\orchestrator.py:79, in SP_and_date_request(method, kwargs_map, func_params, api_key, start_date, end_date, n_attempts, **kwargs)
75 assert len(missing_kwargs) == 0, f"The following kwargs are missing: {', '.join(missing_kwargs)}"
77 r = retry_request(raw, method, kwargs, n_attempts=n_attempts)
---> 79 df_SP = utils.parse_xml_response(r)
80 df = df.append(df_SP)
82 df = utils.expand_cols(df)
File ~\AppData\Roaming\Python\Python38\site-packages\ElexonDataPortal\dev\utils.py:85, in parse_xml_response(r)
83 df = pd.DataFrame(pd.Series(data_content)).T
84 else:
---> 85 raise ValueError('The returned
data_content
must be one of:list
orOrderedDict
')87 return df
ValueError: The returned
data_content
must be one of:list
orOrderedDict
Beta Was this translation helpful? Give feedback.
All reactions