Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mnamer doesn't work since python upgrade to 3.13 #305

Open
brunocpt opened this issue Jan 23, 2025 · 1 comment
Open

mnamer doesn't work since python upgrade to 3.13 #305

brunocpt opened this issue Jan 23, 2025 · 1 comment

Comments

@brunocpt
Copy link

Ever since Python was update to 3.13 (currently, Python 3.13.1), mnamer won't work. This is the crash report:

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

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

  • date = 2025-01-23
  • platform = Linux-6.12.10-arch1-1-x86_64-with-glibc2.40
  • arguments = ['--batch', '--episode-format', '{series}/Season {season:02}/{series}.s{season:02}e{episode:02}.{title}.[{date}]{extension}', /TVSeries/']
  • cache location = /home/bruno/.cache/mnamer-py3.13.sqlite
  • python version = 3.13.1
  • mnamer version = 2.5.6.dev3
  • appdirs version = 1.4.4
  • guessit version = 3.7.1
  • requests version = 2.32.3
  • requests cache version = 0.9.8
  • teletype version = 1.3.4

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

Traceback (most recent call last):
File "/home/user/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 200, in guessit
config = self.configure(options, sanitize_options=False)
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 175, in configure
self.rebulk = rules_builder(advanced_config)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/rules/init.py", line 62, in rebulk_builder
rebulk.rebulk(website(_config('website')))
~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/rules/properties/website.py", line 34, in website
with files('guessit.data') as data_files:
~~~~~^^^^^^^^^^^^^^^^
TypeError: 'PosixPath' object does not support the context manager protocol

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/main.py", line 22, in main
frontend = Cli(settings)
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/frontends.py", line 68, in init
super().init(settings)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/frontends.py", line 24, in init
self.targets = Target.populate_paths(self.settings)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/target.py", line 66, in populate_paths
targets = [cls(file_path, settings) for file_path in file_paths]
~~~^^^^^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/target.py", line 49, in init
self._parse(file_path)
~~~~~~~~~~~^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/mnamer/target.py", line 126, in _parse
raw_data = dict(guessit(str(file_path), options))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 74, in guessit
return default_api.guessit(string, options)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 225, in guessit
raise GuessitException(string, options) from err
guessit.api.GuessitException: An internal error has occurred in guessit.
===================== Guessit Exception Report =====================
version=3.7.1
string=/media/trabalho/Videos/TVSeries/A Teacher.s01e01.[2020.11.10].mp4
options={'type': None, 'language': None}

Traceback (most recent call last):
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 200, in guessit
config = self.configure(options, sanitize_options=False)
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/api.py", line 175, in configure
self.rebulk = rules_builder(advanced_config)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/rules/init.py", line 62, in rebulk_builder
rebulk.rebulk(website(_config('website')))
~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/home/bruno/.local/share/pipx/venvs/mnamer/lib/python3.13/site-packages/guessit/rules/properties/website.py", line 34, in website
with files('guessit.data') as data_files:
~~~~~^^^^^^^^^^^^^^^^
TypeError: 'PosixPath' object does not support the context manager protocol

Please report at https://github.com/guessit-io/guessit/issues.

=============================== 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.

[

@jdegenstein
Copy link

FYI, looks like this may have been fixed with guessit==3.8.0

https://github.com/guessit-io/guessit/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants