mnamer icon indicating copy to clipboard operation
mnamer copied to clipboard

AttributeError: 'CachedSession' object has no attribute '_disabled'

Open DocMAX opened this issue 1 year ago • 7 comments

docmax@desktop: /mnt/pve/data/downloads/irc/done $ mnamer .
Starting mnamer

Processing Movie "Back.to.the.Future.1985.UHD.BluRay.DolbyVisionMP4.2160p.Multi.HEVC-d3g.mp4" (67.35GB)

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

 - date = 2023-11-20
 - platform = Linux-6.2.16-19-pve-x86_64-with-glibc2.38
 - arguments = ['.']
 - cache location = /home/docmax/.cache/mnamer-py3.11.sqlite
 - python version = 3.11.5
 - mnamer version = 2.5.5
 - appdirs version = 1.4.4
 - guessit version = 3.7.1
 - requests version = 2.31.0
 - requests cache version = 1.1.1
 - teletype version = 1.3.4

--------------------------------- stack trace ----------------------------------

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mnamer/__main__.py", line 23, in main
    frontend.launch()
  File "/usr/lib/python3.11/site-packages/mnamer/frontends.py", line 81, in launch
    self._process_targets()
  File "/usr/lib/python3.11/site-packages/mnamer/frontends.py", line 98, in _process_targets
    matches = target.query()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mnamer/target.py", line 232, in query
    for idx, result in enumerate(results, start=1):
  File "/usr/lib/python3.11/site-packages/mnamer/providers.py", line 159, in search
    yield from results
  File "/usr/lib/python3.11/site-packages/mnamer/providers.py", line 181, in _search_name
    response = tmdb_search_movies(
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mnamer/endpoints.py", line 190, in tmdb_search_movies
    status, content = request_json(url, parameters, cache=cache)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mnamer/utils.py", line 259, in request_json
    initial_cache_state = session._disabled  # yes, i'm a bad person
                          ^^^^^^^^^^^^^^^^^
AttributeError: 'CachedSession' object has no attribute '_disabled'

=============================== CRASH REPORT END ===============================

Dang, it looks like mnamer crashed! Please consider filling an issue at
https://github.com/jkwill87/mnamer/issues along with this report.

DocMAX avatar Nov 20 '23 12:11 DocMAX

Me too, and it's a showstopper. Will need to go find a new naming tool until this is fixed.

ivovegter avatar Dec 23 '23 08:12 ivovegter

Me too, and it's a showstopper. Will need to go find a new naming tool until this is fixed.

Did you find something?

devhell avatar Dec 24 '23 19:12 devhell

Did you find something?

Not yet. That's why I'm looking at mnamer. Filebot's dependencies are annoying, and there aren't a lot of other linux options out there.

ivovegter avatar Dec 24 '23 19:12 ivovegter

This is also an issue on Arch. Installing through pip works properly. My environment from the crash report:

[mario@t430 ~]$ mnamer ~/Downloads/benhur.1959.mkv 
Starting mnamer

Processing Movie "benhur.1959.mkv" (6.17GB)

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

 - date = 2023-12-29
 - platform = Linux-6.6.7-arch1-1-x86_64-with-glibc2.38
 - arguments = ['/home/mario/Downloads/benhur.1959.mkv']
 - cache location = /home/mario/.cache/mnamer-py3.11.sqlite
 - python version = 3.11.6
 - mnamer version = 2.5.5
 - appdirs version = 1.4.4
 - guessit version = 3.7.1
 - requests version = 2.31.0
 - requests cache version = 1.1.1
 - teletype version = 1.3.4

mrodz07 avatar Dec 29 '23 21:12 mrodz07

https://github.com/jkwill87/mnamer/pull/291

o7-machinehum avatar Jan 30 '24 08:01 o7-machinehum

Also having this problem on NixOS 24.05 (which doesn't use pip in the traditional sense)

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

 - date = 2024-04-01
 - platform = Linux-6.6.23-x86_64-with-glibc2.38
 - arguments = ['Friesland/']
 - cache location = /home/johannes/.cache/mnamer-py3.11.sql
 - python version = 3.11.8
 - mnamer version = 2.5.4
 - appdirs version = 1.4.4
 - guessit version = 3.8.0
 - requests version = 2.31.0
 - requests cache version = 1.2.0
 - teletype version = 1.3.4

--------------------------------- stack trace ----------------------------------

Traceback (most recent call last):
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/__main__.py", line 23, in main
    frontend.launch()
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/frontends.py", line 80, in launch
    self._process_targets()
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/frontends.py", line 97, in _process_targets
    matches = target.query()
              ^^^^^^^^^^^^^^
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/target.py", line 233, in query
    for idx, result in enumerate(results, start=1):
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/providers.py", line 153, in search
    yield from results
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/providers.py", line 176, in _search_name
    response = tmdb_search_movies(
               ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/endpoints.py", line 213, in tmdb_search_movies
    status, content = request_json(url, parameters, cache=cache)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ps324dvwr7cvmxamp0g8bg2vk7b4071p-mnamer-2.5.4/lib/python3.11/site-packages/mnamer/utils.py", line 283, in request_json
    initial_cache_state = session._disabled  # yes, i'm a bad person
                          ^^^^^^^^^^^^^^^^^
AttributeError: 'CachedSession' object has no attribute '_disabled'

=============================== CRASH REPORT END ===============================

j0hax avatar Apr 01 '24 08:04 j0hax

Hi, after searching for an alternative to tvnamer I found this one, but it crashed:

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

 - date = 2024-05-18
 - platform = Linux-6.1.90-1-MANJARO-x86_64-with-glibc2.39
 - arguments = ['.']
 - cache location = /home/freddy/.cache/mnamer-py3.12.sqlite
 - python version = 3.12.3
 - mnamer version = 2.5.5
 - appdirs version = 1.4.4
 - guessit version = 3.8.0
 - requests version = 2.31.0
 - requests cache version = 1.2.0
 - teletype version = 1.3.4

--------------------------------- stack trace ----------------------------------

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/mnamer/__main__.py", line 23, in main
    frontend.launch()
  File "/usr/lib/python3.12/site-packages/mnamer/frontends.py", line 81, in launch
    self._process_targets()
  File "/usr/lib/python3.12/site-packages/mnamer/frontends.py", line 98, in _process_targets
    matches = target.query()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/mnamer/target.py", line 232, in query
    for idx, result in enumerate(results, start=1):
  File "/usr/lib/python3.12/site-packages/mnamer/providers.py", line 368, in search
    yield from self._search_with_season_and_episode(
  File "/usr/lib/python3.12/site-packages/mnamer/providers.py", line 433, in _search_with_season_and_episode
    series_data = tvmaze_show_search(series)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/mnamer/endpoints.py", line 435, in tvmaze_show_search
    status, content = request_json(url, parameters, cache=cache)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/mnamer/utils.py", line 259, in request_json
    initial_cache_state = session._disabled  # yes, i'm a bad person
                          ^^^^^^^^^^^^^^^^^
AttributeError: 'CachedSession' object has no attribute '_disabled'

=============================== CRASH REPORT END ===============================

frank42hh avatar May 18 '24 10:05 frank42hh