guessit-io / guessit

GuessIt is a python library that extracts as much information as possible from a video filename.
https://guessit-io.github.io/guessit
GNU Lesser General Public License v3.0
824 stars 91 forks source link

ValueError: unused keyword argument 'XXXXXXXX', when trying to guess a file #650

Closed Carnivalio closed 3 years ago

Carnivalio commented 4 years ago

As the title mentioned, I got those errors when trying to guess a file, the keywords consist of 'private_parent', 'children', 'formatter', 'abbreviations', 'private_names' etc.

Here's the error message:


``` version=3.1.1
``` string=Avengers.Endgame.2019.INTERNAL.1080p.UHD.BluRay.x264.DD5.1-Pahe.in.mkv
``` options={}
``` --------------------------------------------------------------------
``` Traceback (most recent call last):
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\guessit\api.py", line 192, in guessit
```     config = self.configure(options, sanitize_options=False)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\guessit\api.py", line 163, in configure
```     self.rebulk = rules_builder(advanced_config)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\guessit\rules\__init__.py", line 56, in rebulk_builder
```     rebulk.rebulk(episodes(_config('episodes')))
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\guessit\rules\properties\episodes.py", line 175, in episodes
```     build_or_pattern(episode_markers + disc_markers, name='episodeMarker') + r'@?(?P<episode>\d+)')\
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\rebulk\builder.py", line 179, in regex
```     return self.pattern(self.build_re(*pattern, **kwargs))
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\rebulk\builder.py", line 107, in build_re
```     return RePattern(*pattern, **kwargs)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\rebulk\pattern.py", line 441, in __init__
```     pattern = call(re.compile, pattern, **self._kwargs)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\rebulk\loose.py", line 60, in call
```     return function(*call_args, **call_kwargs)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\regex\regex.py", line 348, in compile
```     return _compile(pattern, flags, ignore_unused, kwargs)
```   File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\regex\regex.py", line 585, in _compile
```     raise ValueError('unused keyword argument {!a}'.format(any_one))
``` ValueError: unused keyword argument 'children'
``` --------------------------------------------------------------------
``` Please report at https://github.com/guessit-io/guessit/issues.
``` ====================================================================
Toilal commented 3 years ago

It's a duplicate of https://github.com/guessit-io/guessit/issues/656, where I have finally gave a workaround (set REGEX_DISABLED=1 in your environment)