markowanga / stweet

Advanced python library to scrap Twitter (tweets, users) from unofficial API
MIT License
581 stars 67 forks source link

Tests not passing in TweetsByIds Task #28

Closed markowanga closed 3 years ago

markowanga commented 3 years ago

There is error in not existing tweet

Traceback (most recent call last):
  File "/Users/marcinwatroba/Desktop/MY_PROJECTS/stweet/tmp/test_run.py", line 24, in <module>
    st.TweetsByIdsRunner(task, []).run()
  File "/Users/marcinwatroba/Desktop/MY_PROJECTS/stweet/stweet/tweets_by_ids_runner/tweets_by_ids_runner.py", line 61, in run
    tweet_base_info = self._get_base_tweet_info(tweet_id_to_scrap)
  File "/Users/marcinwatroba/Desktop/MY_PROJECTS/stweet/stweet/tweets_by_ids_runner/tweets_by_ids_runner.py", line 70, in _get_base_tweet_info
    return self._get_base_tweet_info_from_text_response(tweet_id, request_result.text)
  File "/Users/marcinwatroba/Desktop/MY_PROJECTS/stweet/stweet/tweets_by_ids_runner/tweets_by_ids_runner.py", line 74, in _get_base_tweet_info_from_text_response
    parsed_json = json.loads(response_text)
  File "/Users/marcinwatroba/miniconda3/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/Users/marcinwatroba/miniconda3/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/marcinwatroba/miniconda3/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
markowanga commented 3 years ago

Sorry for fixing issue for a long time