File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -136,17 +136,17 @@ def fetch_turbine_data_from_oedb(
136136 """
137137 # url of OpenEnergy Platform that contains the oedb
138138 oep_url = "http://oep.iks.cs.ovgu.de/"
139+ url = oep_url + "/api/v0/schema/{}/tables/{}/rows/?" .format (schema , table )
139140
140141 # load data
141- result = requests .get (
142- oep_url + "/api/v0/schema/{}/tables/{}/rows/?" .format (schema , table ),
143- )
142+ result = requests .get (url )
144143 if not result .status_code == 200 :
145144 raise ConnectionError (
146- "Database connection not successful. "
147- "Response: [{}]" .format (result .status_code )
145+ "Database (oep) connection not successful. \n URL: {2}\n "
146+ "Response: [{0}] \n {1}" .format (
147+ result .status_code , result .text , url
148+ )
148149 )
149- # extract data to dataframe
150150 return pd .DataFrame (result .json ())
151151
152152
You can’t perform that action at this time.
0 commit comments