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 277 forks source link

BraceMessage string formatting failed. Using representation instead #3531

Closed ward0 closed 6 years ago

ward0 commented 6 years ago

Before submitting your issue:

Enable debug logging in Medusa settings, reproduce the error (be sure to disable after the bug is fixed)

Medusa Info: Branch: masterCommit: 7b9111eef5836a6846499ef257ffff3f1f35df8fVersion: v0.1.22Database: 44.8
Python Version: 2.7.13 (default, Dec 18 2016, 21:23:50) [GCC 4.6.4]
SSL Version: OpenSSL 1.0.2j 26 Sep 2016
OS: Linux-3.2.40-armv7l-with-glibc2.4
Locale: en_US.UTF-8

What you did: search for Taboo 2017 What happened: pressed manual search to check if torrents were found and error came up What you expected: no error? seems logics Logs:**

2017-12-27 13:27:20 ERROR    SEARCHQUEUE-BACKLOG-292157 :: [7b9111e] BraceMessage string formatting failed. Using representation instead.
  File "/usr/local/python/lib/python2.7/threading.py", line 774, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/local/python/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/search/queue.py", line 555, in run
    self.success = snatch_episode(result)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/search/core.py", line 159, in snatch_episode
    result_downloaded = client.send_torrent(result)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/clients/torrent/generic.py", line 254, in send_torrent
    r_code = self._add_torrent_uri(result)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/clients/torrent/download_station_client.py", line 124, in _add_torrent_uri
    log.debug('Add torrent URI with data: {}'.format(data))
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 89, in log
    self.logger.log(level, brace_msg, **kwargs)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 1489, in log
    self.logger.log(level, msg, *args, **kwargs)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 1231, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 1286, in _log
    self.handle(record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 1296, in handle
    self.callHandlers(record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 1336, in callHandlers
    hdlr.handle(record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 759, in handle
    self.emit(record)
  File "/usr/local/python/lib/python2.7/logging/handlers.py", line 78, in emit
    logging.FileHandler.emit(self, record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 957, in emit
    StreamHandler.emit(self, record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/__init__.py", line 546, in format
    msg = super(CensoredFormatter, self).format(record)
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/local/python/lib/python2.7/logging/__init__.py", line 325, in getMessage
    msg = str(self.msg)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/init/logconfig.py", line 80, in __str__
    result = text_type(self.fmt)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 49, in __str__
    ''.join(traceback.format_stack()),
Traceback (most recent call last):
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 39, in __str__
    return msg.format(*args, **kwargs)
KeyError: "u'version'"
p0psicles commented 6 years ago

Not 100% sure. But I suspect it have something to do with unicode encoded chars.

medariox commented 6 years ago

Ping @labrys

labrys commented 6 years ago

@p0psicles likely not a unicode issue @ward0 could you please include the log lines just before and just after this issue?

p0psicles commented 6 years ago

@ward0 maybe fixed in develop. Can you checkout develop and test if it's fixed?

labrys commented 6 years ago

@p0psicles I don't think the fix affects this, but I can't check this directly.

ward0 commented 6 years ago

I did general config > advanced settings > branch: changed master to develop > click on > checkout branch.

logging:

2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] git clean -d -f -x lib ext medusa.app static SickBeard/helper SickBeard/helpers sickbeard sickrage gui : returned successful
2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] Executing git clean -d -f -x lib ext medusa.app static SickBeard/helper SickBeard/helpers sickbeard sickrage gui with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:57 WARNING  Thread-16 :: [7b9111e] git checkout -f develop returned : error: pathspec 'develop' did not match any file(s) known to git.
2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] Executing git checkout -f develop with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:57 DEBUG    Thread-16 :: [7b9111e] git clean -d -f -x lib ext medusa.app static SickBeard/helper SickBeard/helpers sickbeard sickrage gui : returned successful
2017-12-30 23:15:56 DEBUG    Thread-16 :: [7b9111e] Executing git clean -d -f -x lib ext medusa.app static SickBeard/helper SickBeard/helpers sickbeard sickrage gui with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:56 DEBUG    Thread-16 :: [7b9111e] git reset --hard origin/master : returned successful
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Executing git reset --hard origin/master with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] git config remote.origin.pushurl https://github.com/**********/Medusa : returned successful
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Executing git config remote.origin.pushurl https://github.com/**********/Medusa with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Branch checkout: master->develop
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:55 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:55 INFO     Thread-16 :: [7b9111e] Config backup successful, updating...
2017-12-30 23:15:34 INFO     Thread-16 :: [7b9111e] Config backup in progress...
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Using: git
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] git version : returned successful
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Executing git version with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Checking if we can use git commands: git version
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Checkout branch has the same DB version - Equal
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] User-Agent: Medusa/0.1.21 (Linux; 3.2.40; df45d57d-edaa-11e7-a114-00113230256d)
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] GET URL: http://cdn.rawgit.com/pymedusa/Medusa/7b9111eef5836a6846499ef257ffff3f1f35df8f/medusa/databases/main_db.py [Status: 200]
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] cur_commit = 7b9111eef5836a6846499ef257ffff3f1f35df8f, newest_commit = 7b9111eef5836a6846499ef257ffff3f1f35df8f, num_commits_behind = 0, num_commits_ahead = 0
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] git rev-list --left-right "@{upstream}"...HEAD : returned successful
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Executing git rev-list --left-right "@{upstream}"...HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] git rev-parse --verify --quiet "@{upstream}" : returned successful
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] Executing git rev-parse --verify --quiet "@{upstream}" with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:34 DEBUG    Thread-16 :: [7b9111e] git fetch origin : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git fetch origin with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git config remote.origin.pushurl https://github.com/**********/Medusa : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git config remote.origin.pushurl https://github.com/**********/Medusa with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git rev-parse HEAD : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git rev-parse HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git symbolic-ref -q HEAD : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Using: git
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] git version : returned successful
2017-12-30 23:15:32 DEBUG    Thread-16 :: [7b9111e] Executing git version with your shell in /volume1/@appstore/sickbeard-custom/var/SickBeard

Any advice what is going wrong?

medariox commented 6 years ago

Should be fixed in develop.