title: Json file parameter on Pycharm
body: <p>I'm running <code>twitter_hashtag_frequency.py</code> program on Pycharm with <code>json file</code> parameter and I have this error :</p>
  <pre><code>['C:/Users/HP/PycharmProjects/Bonzanini_Book_Exercises/twitter_hashtag_frequency.py', 'stream_.jsonl']
  Traceback (most recent call last):
  
  File &quot;C:/Users/HP/PycharmProjects/Bonzanini_Book_Exercises/twitter_hashtag_frequency.py&quot;, line 17, in &lt;module&gt;
      tweet = json.loads(line)
    File &quot;C:\Users\HP\Anaconda3\lib\json\__init__.py&quot;, line 348, in loads
      return _default_decoder.decode(s)
    File &quot;C:\Users\HP\Anaconda3\lib\json\decoder.py&quot;, line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File &quot;C:\Users\HP\Anaconda3\lib\json\decoder.py&quot;, line 355, in raw_decode
      raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
  </code></pre>
  <p>This is the code:</p>
  <pre><code># Chap02-03/twitter_hashtag_frequency.py
  import sys
  from collections import Counter
  import json
  
  def get_hashtags(tweet):
      entities = tweet.get('entities', {})
      hashtags = entities.get('hashtags', [])
      return [tag['text'].lower() for tag in hashtags]
  
  if __name__ == '__main__':
      print(sys.argv)
      fname = sys.argv[1]
      with open(fname, 'r') as f:
          hashtags = Counter()
          for line in f:
              tweet = json.loads(line)
              hashtags_in_tweet = get_hashtags(tweet)
              hashtags.update(hashtags_in_tweet)
          for tag, count in hashtags.most_common(20):
              print(&quot;{}: {}&quot;.format(tag, count))
  </code></pre>
  <p>As you see in the screenshot the json file <code>stream_.jsonl</code>is in the same path with the program <a href="https://i.stack.imgur.com/q22Ir.png" rel="nofollow noreferrer">Pycharm running window</a></p>
  <p>The windows of edit configuration sounds like good this is the screenshoot <a href="https://i.stack.imgur.com/uRp5L.png" rel="nofollow noreferrer">Run debug configurations screenshot</a></p>
  <p>The <code>json file</code> file is an output of streaming tweets of 4629 lines. I would have your help, thank you.</p>