snejus / beetcamp

Bandcamp autotagger source for beets (http://beets.io)
GNU General Public License v2.0
64 stars 11 forks source link

re.error: unbalanced parenthesis at position 8 #19

Closed arogl closed 2 years ago

arogl commented 2 years ago

Running the latest release, encountered the following error:

bandcamp: Unexpected error obtaining https://sunn.bandcamp.com/album/3-flight-of-the-behemoth, please report at https://github.com/snejus/beetcamp/issues/new
Traceback (most recent call last):
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/__init__.py", line 265, in handle
    return getattr(guru, attr)
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/_metaguru.py", line 526, in album
    filtered_tracks = self.tracks
  File "/home/arogl/.local/lib/python3.8/site-packages/cached_property.py", line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/_metaguru.py", line 383, in tracks
    albumartist = self.bandcamp_albumartist
  File "/home/arogl/.local/lib/python3.8/site-packages/cached_property.py", line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/_metaguru.py", line 315, in bandcamp_albumartist
    self.parse_track_name(album, self.catalognum).get("artist") or albumartist
  File "/home/arogl/.local/lib/python3.8/site-packages/cached_property.py", line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/_metaguru.py", line 358, in catalognum
    return self.parse_catalognum(
  File "/home/arogl/.local/lib/python3.8/site-packages/beetsplug/bandcamp/_metaguru.py", line 147, in parse_catalognum
    match = re.search(pattern, re.sub(PATTERNS["catalognum_excl"], "", source))
  File "/usr/lib/python3.8/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
  File "/usr/lib/python3.8/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.8/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.8/sre_parse.py", line 962, in parse
    raise source.error("unbalanced parenthesis")
re.error: unbalanced parenthesis at position 8
snejus commented 2 years ago

Completely forgot about SUNN O))) existence and their mad parentheses. This is also now done, let me address the last one

snejus commented 2 years ago

Fixed in 0.10.1