Spaces:
Running
Running
Robert Castagna
commited on
Commit
·
6cde635
1
Parent(s):
36a372e
include db params in try catch block
Browse files- pages/1_Fundamentals.py +9 -9
pages/1_Fundamentals.py
CHANGED
@@ -187,16 +187,16 @@ with st.form(key="selecting columns"):
|
|
187 |
'quarterly_series_data': ('APPEND', 'quarterly_financials'),
|
188 |
'basic_info': ('OVERWRITE', 'companies')
|
189 |
}
|
190 |
-
|
191 |
-
dbparams = {
|
192 |
-
'dbname':"hf_fundamentals",
|
193 |
-
'user':"postgres",
|
194 |
-
'password':os.environ['postgres_pwd'],
|
195 |
-
'host':"localhost",
|
196 |
-
'port':"5432"
|
197 |
-
}
|
198 |
-
|
199 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
with psycopg2.connect(**dbparams) as conn:
|
201 |
conn.autocommit=True
|
202 |
|
|
|
187 |
'quarterly_series_data': ('APPEND', 'quarterly_financials'),
|
188 |
'basic_info': ('OVERWRITE', 'companies')
|
189 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
try:
|
191 |
+
|
192 |
+
dbparams = {
|
193 |
+
'dbname':"hf_fundamentals",
|
194 |
+
'user':"postgres",
|
195 |
+
'password':os.environ['postgres_pwd'],
|
196 |
+
'host':"localhost",
|
197 |
+
'port':"5432"
|
198 |
+
}
|
199 |
+
|
200 |
with psycopg2.connect(**dbparams) as conn:
|
201 |
conn.autocommit=True
|
202 |
|