pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.8k stars 276 forks source link

[APP SUBMITTED]: ValueError: unmatched '{' in format #2753

Closed duramato closed 7 years ago

duramato commented 7 years ago

INFO

Python Version: 2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2] Operating System: Linux-4.4.38-v7+-armv7l-with-debian-8.0 Locale: UTF-8 Branch: develop Database: 44.8 Commit: pymedusa/Medusa@de56ff0af1f88a0f992df41c74a1326deb502b03 Link to Log: https://gist.github.com/3b338cba6f7ecf708a0e3d504aac7dbb

ERROR

2017-05-08 10:14:51 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [HDBits] :: [e90e55e] BraceMessage string formatting failed. Using representation instead.
Traceback (most recent call last):
  File "/home/pi/Medusa/medusa/logger/adapters/style.py", line 34, in __str__
    return self.msg.format(*args, **kwargs)
ValueError: unmatched '{' in format

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

duramato commented 7 years ago

@labrys

p0psicles commented 7 years ago

Related issue maybe.

Add provider drunkenslug, search for latest boruto ep.


2017-05-08 22:24:30 ERROR    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] BraceMessage string formatting failed. Using representation instead.
Traceback (most recent call last):
  File "/opt/medusa/medusa/logger/adapters/style.py", line 34, in __str__
    return self.msg.format(*args, **kwargs)
AttributeError: 'InvalidShowException' object has no attribute 'format'
2017-05-08 22:24:30 ERROR    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] BraceMessage string formatting failed. Using representation instead.
Traceback (most recent call last):
  File "/opt/medusa/medusa/logger/adapters/style.py", line 34, in __str__
    return self.msg.format(*args, **kwargs)
AttributeError: 'InvalidShowException' object has no attribute 'format'
2017-05-08 22:24:30 DEBUG    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] Using cached parse result for Boruto.-.Naruto.Next.Generations.-.05.(1280x720.HEVC2.AAC)
2017-05-08 22:24:30 DEBUG    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] Using cached parse result for Boruto.-.Naruto.Next.Generations.-.05.(1280x720.HEVC2.AAC)
2017-05-08 22:24:30 DEBUG    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] Using cached parse result for Boruto.-.Naruto.Next.Generations.-.05.[1080p].[Multi-Sub].[x265].[pseudo]
2017-05-08 22:24:30 DEBUG    SEARCHQUEUE-MANUAL-321285 :: [drunkenslug] :: [2f6b3a9] Using cached parse result for Boruto.-.Naruto.Next.Generations.-.05.[1080p]```
labrys commented 7 years ago

@p0psicles I've added the stacktrace to the fallback in pr #2772 so the source of these calls is a little clearer.

p0psicles commented 7 years ago

Maybe related, buy how are we going handle releases like these: Removed parsed cached result for release: One.Piece.-.Film.12.-.One.Piece.Z.720p.{VOSTFR+VF}

labrys commented 7 years ago

@p0psicles That should generally not be an issue because that is what would populate the parameter. For example:

>>> 'Test {message}'.format(message='a string with {Braces}')
'Test a string with {Braces}'

This won't be dealt with until after the old logger is deprecated, partly because it may no longer be a problem after we remove the old style adapter, and partly because a fix may require a fancy two-step to avoid issues with the old adapter. Fixing it after deprecation would be much simpler.

fernandog commented 7 years ago

@duramato fixed?