Code not printing

I’m trying to write some code with functions, and it was working yesterday, but today, when I run it, nothing happens. I don’t get en error code, either. I am using VSCode
This is my code:

#importing modules
import statbotics
import requests
import json
from requests.auth import HTTPBasicAuth

import pandas as pd

#note that so far, the functions that call to The Blue Alliance will only print data in json
#work is going on to convert this to more readable csv data for programs like excel

#the statbotics functions return data in python dictionary

#work is also in progress for a more user-friendly interface

#the season year
year = '2023'

#event codes
houstonChampionships = year + 'cmptx'
canadianPacificRegional = year + 'bcvi'

#statbotics object
sb = statbotics.Statbotics()

#authentication headers
headers = {'X-TBA-Auth-Key': 'Ra4ErLM8H0zAHHFrZjFYQIlHHDdKQOqTOdYpaz19g5HI5JGaIKStRqYbysW5qr6D'}

#get OPRS for an event
def eventOPR(eventCode):
    OPRSRaw = requests.get(''%(eventCode), headers=headers)
    OPRS = OPRSRaw.content

#get the teams for an event
def eventTeams(eventCode):
    teamsRaw = requests.get(''%(eventCode), headers=headers)
    teams = teamsRaw.content

#gets a team's matches for an event

def teamMatches(teamCode, eventCode):
    matchesRaw = requests.get(''%(teamCode, eventCode), headers=headers)
    matches = matchesRaw.content

#get awards from an event
def eventAwards(eventCode):
    awardsRaw = requests.get(''%(eventCode), headers=headers)
    awards = awardsRaw.content

#get the events that a team has this year (year is corresponding to the year set in the year variable)
def teamEvents(teamCode):
    eventsRaw = requests.get(''%(teamCode) + year, headers=headers)
    events = eventsRaw.content

#get the awards that a team won at an event
def teamAwardsEvents(teamCode, eventCode):
    teamAwardsRaw = requests.get(''%(teamCode, eventCode), headers=headers)
    teamAwards = teamAwardsRaw.content

#get the statbotics stats for a team
def sbTeamStats(teamCode):
    teamStats = sb.get_team(teamCode)

#get the mean EPA of a team at a certain event
def sbTeamEventEPA(teamCode, eventCode):
    teamEventEPA = sb.get_team_event(teamCode, eventCode, ['epa_mean'])

#get certain statbotics stats for a team at en event
def sbTeamEventStats(teamCode, eventCode, fields=['all']):
    teamEventStats = sb.get_team_event(teamCode, eventCode, fields)

# get teams by country or state/province (only for US and Canada)
def sbTeamSorts(country=None, adminDivision=None, activeOrNo=True, fieldsParam=['all']):
    teamSorts = sb.get_teams(country, adminDivision, active=activeOrNo, fields=fieldsParam)

# call your functions here

This is what vscode shows:

I’m using Ubuntu 20.04

Flatten (un-indent) the last line: sbTeamStats(9180)

Thank you! It works now.

1 Like