AnthonyBloomer / ezflix

Command line utility that enables users to search for TV and movie torrents and stream using Peerflix automatically.
https://anthonybloomer.github.io/ezflix/
MIT License
47 stars 9 forks source link

Possible incompatibility with Python3.8 #24

Closed moihub closed 4 years ago

moihub commented 4 years ago

To start, thank you for this great piece of work.

After using ezflix for a while on Linux Mint 19.3, which uses Python 3.6, I upgraded to Mint 20 and suddenly ezflix stopped working. The obvious change is the different Python version, which is now 3.8. Here's some sample output: Than you in advance for looking into this.

ezflix lucifer ⠦ Searching...Traceback (most recent call last): File "$HOME/.local/bin/ezflix", line 8, in sys.exit(main()) File "$HOME/.local/lib/python3.8/site-packages/ezflix/main.py", line 43, in main search(p) File "$HOME/.local/lib/python3.8/site-packages/ezflix/main.py", line 159, in search torrents = ezflix.search() File "$HOME/.local/lib/python3.8/site-packages/ezflix/ezflix.py", line 74, in search self._torrents = eztv( File "$HOME/.local/lib/python3.8/site-packages/ezflix/extractors/eztv.py", line 29, in eztv imdb_id = get_external_id(sr[0].id)[2:] TypeError: 'NoneType' object is not subscriptable

AnthonyBloomer commented 4 years ago

Thank you for creating this issue, @moihub. get_external_id returned a None value due to this:

return details.imdb_id if hasattr(details, "imdb_id") else None

In my TMDb client, external_ids was recently updated to return a dictionary rather than an object so that line will always return None.

I've pushed the latest code that fixes this to PyPi. You can install using pip:

pip install ezflix==1.6.5

Please let me know how this version works for you!

akash-258 commented 2 years ago
ezflix "South Park" --latest
⠸ Searching...Traceback (most recent call last):
  File "/home/akash/.local/bin/ezflix", line 8, in <module>
    sys.exit(main())
  File "/home/akash/.local/lib/python3.8/site-packages/ezflix/main.py", line 43, in main
    search(p)
  File "/home/akash/.local/lib/python3.8/site-packages/ezflix/main.py", line 159, in search
    torrents = ezflix.search()
  File "/home/akash/.local/lib/python3.8/site-packages/ezflix/ezflix.py", line 74, in search
    self._torrents = eztv(
  File "/home/akash/.local/lib/python3.8/site-packages/ezflix/extractors/eztv.py", line 38, in eztv
    search_results = req.json()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@AnthonyBloomer I am getting this error on a fresh install of ezflix. Linuxmint 20.3 Python3 version : 3.8.10 Python version : 2.7.18