Requests issue - No JSON object could be decoded
<p>I'm new to python and I'm trying to convert some MATLAB code into python.
I have a url from the NBA website in json format that I would like to parse and return as a dataframe. I have the following code so far:</p>

<pre><code>import requests
url = 'http://stats.nba.com/stats/shotchartdetail?PlayerID=2544&amp;TeamID=0&amp;VsConference=&amp;Location=&amp;SeasonType=Regular+Season&amp;RookieYear=&amp;Season=2015-16&amp;DateFrom=&amp;ClutchTime=&amp;GameID=&amp;OpponentTeamID=0&amp;DateTo=&amp;GameSegment=&amp;AheadBehind=&amp;LastNGames=0&amp;VsDivision=&amp;LeagueID=&amp;Position=&amp;Outcome=&amp;ContextMeasure=FGM&amp;SeasonSegment=&amp;Period=0&amp;Month=0'
r = requests.get(url)
data = r.json()
</code></pre>

<p>I can see that the json loads on my browser by using the url and this also works in MATLAB but I get the following error message in python:
No JSON object could be decoded</p>

<p>Any idea what the issue is?</p>