JSONDecodeError: Expecting value: line 1 column 1 (char 0)
today = datetime.today() day = datetime.now().day datem = datetime.now().month datey = datetime.now().year
import calendar calendar.monthrange(datey, datem)[1]
--> = Code to check before running
i = int(day)-1
--> endate should be 2 days after last month day
days31 = {1,3,5,7,8,10,12} feb = 2
datem = str(datem) if len(datem) == 1: datem = '0'+datem
enddate = int(day)
--> Use <10 for Single Digit Days
#while (i <10):
--> Use <32 or <31 for Double Digit Days
while (i < enddate): cv = str(i) if i <10: # --> For Single Digit Days use '0'+cv cv2 = '0'+cv
elif i >9 and i < 32:
# --> For Double Digit Days use cv
cv2 = cv
else:
os.system('say "your program has finished"')
break
# --> Make sure Month & Year Correct
CY = '2021_22'
DFrom = '10/19/2021'
DTo = str(datem) + "/" + cv2 + "/" + str(datey)
#DTo = "11/1/2021"
Y = DTo.replace("/", '')
SZN = '2021-22'
statfind = leaguedashteamstats.LeagueDashTeamStats(season=SZN, date_to_nullable=DTo, location_nullable=('Home'),date_from_nullable=DFrom,per_mode_detailed='PerGame')
@sportsstats - I'm having some trouble understanding where your issue is and your post has partial code/text which makes it difficult to copy/paste for testing. Could you please clarify where you are having an issue? Pleae include any imports as I don't see imports for nba_api or datetime, etc.
I you want to paste a large code block in GitHub, please use tripel ticks ``` to begin and end your code block. They must be on their own lines thus preceding and succeeding the code.
My Code
Thank you.
no reponse