json.loads or json.load() on tweet result
<p>I use this code to get the tweet from the feed which i write inside a file.
When i read the file and try to json the lines i always get an ERROR.</p>

<pre><code>    def SearchTwt(api):
    os.chdir('/Users/me/Desktop')
    SearchResult = api.search( q='market',lang='en',rpp=20)
    text_file = open("TweetOut.txt", "w")
    for tw in SearchResult:
        text_file.write(str(tw))
        print(str(tw))
    text_file.close()
</code></pre>

<p>I read the file with:</p>

<pre><code>    def readfile():
    tweets_data = []
    os.chdir('/Users/me/Desktop')
    file = open("TweetOut.txt", "r")

    for line in file:
        parts = line.split("Status(")

        print (len(parts))
        for part in parts:
            tweet = 'Status('+part
            if len(tweet) &gt; 10:
                tweetj = json.loads(tweet)
                #tweets_data.append(tweet)
                print(tweet)
    file.close()
</code></pre>

<p>May be this is wrong to fill the file with str(tw)? Yes I rebuild the string during the reading because i thought the tweet started like that. So may be another mistake.</p>

<p>I tried a lot of other options.</p>

<p>the error:
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)</p>

<p>the file starts like this (edited the url as asked by stack):
Status(source='SocialFlow', id=757991135465857024, in_reply_to_status_id=None, is_quote_status=False, entities={'hashtags': [], 'user_mentions': [], 'symbols': [], 'urls': [{'url': '', 'expanded_url': '', 'display_url':</p>