lunarflu HF staff commited on
Commit
82e2581
·
verified ·
1 Parent(s): ec5588a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -78,12 +78,13 @@ async def update_google_sheet():
78
  worksheet = gspread_bot.open(name).sheet1
79
  global_df['discord_user_id'] = global_df['discord_user_id'].astype(str)
80
  set_with_dataframe(worksheet, global_df)
 
81
  worksheet.format(f"A1:A{len(global_df.index)+1}", {
82
  "numberFormat": {
83
  "type": 'TEXT',
84
  },
85
  })
86
- print({f"Google sheet {name} successfully updated! \n {global_df}"})
87
  except Exception as e:
88
  print(f"on_message Error: {e}")
89
 
 
78
  worksheet = gspread_bot.open(name).sheet1
79
  global_df['discord_user_id'] = global_df['discord_user_id'].astype(str)
80
  set_with_dataframe(worksheet, global_df)
81
+ # very important, otherwise gspread will force format IDs in scientific notation by default (making them unusable)
82
  worksheet.format(f"A1:A{len(global_df.index)+1}", {
83
  "numberFormat": {
84
  "type": 'TEXT',
85
  },
86
  })
87
+ print(f"Google sheet {name} successfully updated! \n {global_df}")
88
  except Exception as e:
89
  print(f"on_message Error: {e}")
90