plex_debrid icon indicating copy to clipboard operation
plex_debrid copied to clipboard

Regex Core Error

Open godver3 opened this issue 2 years ago • 4 comments

7B82F177-BAEE-4698-9866-5907E49EB116

Getting this on 2.94.

godver3 avatar Jul 29 '23 17:07 godver3

I also am getting this issue on this version.

Tragidy avatar Jul 31 '23 14:07 Tragidy

according to people on discord they are getting this for a movie called +1 and when checking my log I had it crash on same movie.

plex-debrid  | [07/08/23 18:33:14] scraping sources [orionoid,torrentio] for query "+1.2013" ... done - found 10 releases
plex-debrid  | [07/08/23 18:33:15] scraping sources [orionoid,torrentio] for IMDB ID "tt2395385" ... done - found 10 releases
plex-debrid  | [07/08/23 18:33:16] checking cache status for scraped releases on: [Real Debrid] ... done
plex-debrid  | [07/08/23 18:33:17] sorting releases for version [1080p SDR] ... done - found 16 releases
plex-debrid  | Exception in thread Thread-1 (threaded):
plex-debrid  | Traceback (most recent call last):
plex-debrid  |   File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
plex-debrid  |     self.run()
plex-debrid  |   File "/usr/lib/python3.11/threading.py", line 975, in run
plex-debrid  |     self._target(*self._args, **self._kwargs)
plex-debrid  |   File "/plex_debrid/ui/__init__.py", line 497, in threaded
plex-debrid  |     element.download(library=library)
plex-debrid  |   File "/plex_debrid/content/classes.py", line 1149, in download
plex-debrid  |     debrid_downloaded, retry = self.debrid_download(force=False)
plex-debrid  |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
plex-debrid  |   File "/plex_debrid/content/classes.py", line 1446, in debrid_download
plex-debrid  |     if debrid.download(self, stream=True,force=force):
plex-debrid  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
plex-debrid  |   File "/plex_debrid/debrid/__init__.py", line 24, in download
plex-debrid  |     if service.download(element, stream=stream, query=query, force=force):
plex-debrid  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
plex-debrid  |   File "/plex_debrid/debrid/services/realdebrid.py", line 131, in download
plex-debrid  |     if regex.match(query, release.title,regex.I) or force:
plex-debrid  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
plex-debrid  |   File "/usr/lib/python3.11/site-packages/regex/regex.py", line 253, in match
plex-debrid  |     pat = _compile(pattern, flags, ignore_unused, kwargs, True)
plex-debrid  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
plex-debrid  |   File "/usr/lib/python3.11/site-packages/regex/regex.py", line 546, in _compile
plex-debrid  |     raise error(caught_exception.msg, caught_exception.pattern,
plex-debrid  | regex._regex_core.error: nothing to repeat at position 15

so most likely its an escaping issue, we need to figure out a regex for it.

KingPin avatar Aug 07 '23 18:08 KingPin

Thanks for reporting and testing this. It seems we need to escape the special characters in the media titles correctly. This is already done somewhere, but apparently there are ways for titles to circumvent the escaping. I'll check that out.

itsToggle avatar Aug 10 '23 08:08 itsToggle

I am also running into this issue, is there any fix yet?

thierrybla avatar Feb 16 '24 22:02 thierrybla