trakt / Plex-Trakt-Scrobbler

Add what you are watching on Plex to trakt.tv
1.45k stars 166 forks source link

Trakt will not update from Plex (SQLError: unsupported file format) #340

Closed felixherzog closed 8 years ago

felixherzog commented 8 years ago

hi i use trakt with plex. it used to work, but no it doesn't update. i instaled it new several times.i am using plex on a synology. here my logfile. thaks for your help.

2016-07-07 11:57:30,557 (-8f17900) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: a17e99e (Fri Jun 24 02:07:16 UTC 2016)
2016-07-07 11:57:30,558 (-8f17900) :  DEBUG (core:361) - Using the elevated policy
2016-07-07 11:57:30,558 (-8f17900) :  DEBUG (core:450) - Starting runtime component.
2016-07-07 11:57:30,559 (-8f17900) :  DEBUG (core:450) - Starting caching component.
2016-07-07 11:57:30,560 (-8f17900) :  DEBUG (core:450) - Starting data component.
2016-07-07 11:57:30,560 (-8f17900) :  DEBUG (core:450) - Starting networking component.
2016-07-07 11:57:30,561 (-8f17900) :  DEBUG (networking:282) - Loaded HTTP cookies
2016-07-07 11:57:30,561 (-8f17900) :  DEBUG (caching:108) - No info file found, trashing the cache folder
2016-07-07 11:57:30,563 (-8f17900) :  DEBUG (networking:450) - Setting the default network timeout to 20.0
2016-07-07 11:57:30,564 (-8f17900) :  DEBUG (core:450) - Starting localization component.
2016-07-07 11:57:30,565 (-8f17900) :  INFO (localization:409) - Setting the default locale to en-us
2016-07-07 11:57:30,565 (-8f17900) :  DEBUG (localization:427) - Loaded en strings
2016-07-07 11:57:30,565 (-8f17900) :  DEBUG (core:450) - Starting messaging component.
2016-07-07 11:57:30,566 (-8f17900) :  DEBUG (core:450) - Starting debugging component.
2016-07-07 11:57:30,566 (-8f17900) :  DEBUG (core:450) - Starting services component.
2016-07-07 11:57:30,567 (-8f17900) :  DEBUG (core:450) - Starting myplex component.
2016-07-07 11:57:30,567 (-b5ee4c0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.plugins.trakttv'
2016-07-07 11:57:30,567 (-8f17900) :  DEBUG (core:450) - Starting notifications component.
2016-07-07 11:57:30,713 (-8f17900) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.plugins.trakttv in namespace 'metadata'
2016-07-07 11:57:30,718 (-8f17900) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2016-07-07 11:57:30,786 (-b5ee4c0) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2016-07-07 11:57:30,786 (-8f17900) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2016-07-07 11:57:30,787 (-b5ee4c0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2016-07-07 11:57:30,792 (-8f17900) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2016-07-07 11:57:30,792 (-8f17900) :  DEBUG (core:150) - Finished starting framework core
2016-07-07 11:57:30,793 (-8f17900) :  DEBUG (core:560) - Loading plug-in code
2016-07-07 11:57:30,793 (-bbca4c0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400'
2016-07-07 11:57:30,840 (-8f17900) :  DEBUG (core:566) - Finished loading plug-in code
2016-07-07 11:57:30,955 (-bbca4c0) :  DEBUG (core:538) - Machine identifier is 8f560d49f105723db3d48016e7354df542fb8063
2016-07-07 11:57:30,956 (-bbca4c0) :  DEBUG (core:539) - Server version is 1.0.0.2261-a17e99e
2016-07-07 11:57:30,980 (-8f17900) :  DEBUG (fs_migrator:19) - Running migration: <fs_migrator.Clean object at 0x8a85f2c>
2016-07-07 11:57:30,988 (-8f17900) :  DEBUG (fs_migrator:19) - Running migration: <fs_migrator.ForceLegacy object at 0x8a893cc>
2016-07-07 11:57:30,989 (-8f17900) :  DEBUG (fs_migrator:19) - Running migration: <fs_migrator.SelectiveSync object at 0x8a893ac>
2016-07-07 11:57:31,339 (-b5ee4c0) :  DEBUG (services:362) - Loaded services
2016-07-07 11:57:31,346 (-b8dc4c0) :  DEBUG (services:438) - No shared code to load
2016-07-07 11:57:31,440 - plugin.core.logger.handlers.error_reporter.ErrorReporter (-8f17900) :  DEBUG (plugin.core.logger.handlers.error_reporter.ErrorReporter:201) - Configuring Raven for host: threaded+requests+http://6afe79a788d64af2ad3f0f5a7fc83912:fdcabc5f09aa4b7b93edfb21263bb33e@sentry.skipthe.net:/1
2016-07-07 11:57:31,445 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:72) - Initialized logging (report: True, storage: False)
2016-07-07 11:57:31,446 - com.plexapp.plugins.trakttv      (-8f17900) :  DEBUG (com.plexapp.plugins.trakttv:258) - Loaded preferences from DefaultPrefs.json
2016-07-07 11:57:31,447 - com.plexapp.plugins.trakttv      (-8f17900) :  DEBUG (com.plexapp.plugins.trakttv:178) - Loaded the user preferences for com.plexapp.plugins.trakttv
2016-07-07 11:57:31,447 - plugin.core.environment          (-8f17900) :  WARNING (plugin.core.environment:116) - Unable to set locale to 'en_US': unsupported locale setting
Traceback (most recent call last):
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/core/environment.py", line 114, in setup_locale
    locale.setlocale(locale.LC_ALL, DEFAULT_LOCALE)
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/locale.py", line 547, in setlocale
Error: unsupported locale setting
2016-07-07 11:57:31,452 - plugin.core.logger.handlers.error_reporter.ErrorReporter (-8f17900) :  DEBUG (plugin.core.logger.handlers.error_reporter.ErrorReporter:610) - Sending message of length 1520 to threaded+requests+http://sentry.skipthe.net/api/1/store/
2016-07-07 11:57:31,461 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:57:31,461 - plugin.core.environment          (-8f17900) :  INFO (plugin.core.environment:192) - Unable to detect system language, defaulting to the "en_US" locale
2016-07-07 11:57:31,463 - plugin.core.environment          (-8f17900) :  INFO (plugin.core.environment:165) - Using languages: ['en_us', 'en'] (translation: <gettext.GNUTranslations instance at 0x8d64d6c>)
2016-07-07 11:57:31,534 - plugin.core.configuration        (-8f17900) :  DEBUG (plugin.core.configuration:33) - Parsing configuration file: 'Data/com.plexapp.plugins.trakttv/advanced.ini'
2016-07-07 11:57:31,548 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:189) - Cached libraries to 'Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries'
2016-07-07 11:57:31,548 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:36) - Using native libraries at 'Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries'
2016-07-07 11:57:31,548 - plugin.core.libraries.helpers.path (-8f17900) :  DEBUG (plugin.core.libraries.helpers.path:45) - Removed path: 'Plug-ins/Trakttv.bundle/Contents/Libraries/Linux/i386'
2016-07-07 11:57:31,548 - plugin.core.libraries.manager    (-8f17900) :  DEBUG (plugin.core.libraries.manager:198) - Bits: '32bit', Machine: 'x86_64'
2016-07-07 11:57:31,549 - plugin.core.libraries.manager    (-8f17900) :  DEBUG (plugin.core.libraries.manager:207) - System: 'Linux', Architecture: 'i386'
2016-07-07 11:57:31,549 - plugin.core.libraries.helpers.path (-8f17900) :  DEBUG (plugin.core.libraries.helpers.path:30) - Inserted path: 'Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries/Linux/i386'
2016-07-07 11:57:31,549 - plugin.core.libraries.manager    (-8f17900) :  DEBUG (plugin.core.libraries.manager:241) - UCS: 'ucs4'
2016-07-07 11:57:31,549 - plugin.core.libraries.helpers.path (-8f17900) :  DEBUG (plugin.core.libraries.helpers.path:30) - Inserted path: 'Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries/Linux/i386/ucs4'
2016-07-07 11:57:31,549 - plugin.core.libraries.helpers.arm (-8f17900) :  DEBUG (plugin.core.libraries.helpers.arm:115) - Fetching processor information from "/proc/cpuinfo"...
2016-07-07 11:57:31,550 - plugin.core.libraries.helpers.arm (-8f17900) :  INFO (plugin.core.libraries.helpers.arm:44) - Unable to retrieve processor identifier from "/proc/cpuinfo"
2016-07-07 11:57:31,550 - plugin.core.libraries.helpers.system (-8f17900) :  INFO (plugin.core.libraries.helpers.system:198) - Executable at '' doesn't exist, using '/bin/ls' instead
2016-07-07 11:57:31,553 - plugin.core.libraries.helpers.system (-8f17900) :  INFO (plugin.core.libraries.helpers.system:221) - Unable to find attributes section in ELF: '/bin/ls'
2016-07-07 11:57:31,553 - plugin.core.libraries.manager    (-8f17900) :  DEBUG (plugin.core.libraries.manager:250) - CPU Type: None
2016-07-07 11:57:31,554 - plugin.core.libraries.manager    (-8f17900) :  DEBUG (plugin.core.libraries.manager:251) - Page Size: '4k'
2016-07-07 11:57:31,554 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:51) - [PATH] Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries/Linux/i386/ucs4
2016-07-07 11:57:31,554 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:51) - [PATH] Plug-in Support/Data/com.plexapp.plugins.trakttv/Libraries/Linux/i386
2016-07-07 11:57:31,554 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:51) - [PATH] Plug-ins/Trakttv.bundle/Contents/Libraries/Shared
2016-07-07 11:57:31,555 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:56) - Testing native library support...
2016-07-07 11:57:31,555 - plugin.core.libraries.tests.core.base (-8f17900) :  DEBUG (plugin.core.libraries.tests.core.base:96) - Starting test: plugin.core.libraries.tests.apsw_:test_import
2016-07-07 11:57:31,634 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:102) - apsw: available (sqlite: 3010002, apsw: 3.10.2-r1)
2016-07-07 11:57:31,634 - plugin.core.libraries.tests.core.base (-8f17900) :  DEBUG (plugin.core.libraries.tests.core.base:96) - Starting test: plugin.core.libraries.tests.cryptography_:test_import
2016-07-07 11:57:31,704 - root                             (-8f17900) :  WARNING (root:1601) - cryptography: unavailable - libffi.so.6: cannot open shared object file: No such file or directory
2016-07-07 11:57:31,706 - plugin.core.logger.handlers.error_reporter.ErrorReporter (-8f17900) :  DEBUG (plugin.core.logger.handlers.error_reporter.ErrorReporter:610) - Sending message of length 1104 to threaded+requests+http://sentry.skipthe.net/api/1/store/
2016-07-07 11:57:31,706 - plugin.core.libraries.tests.core.base (-8f17900) :  DEBUG (plugin.core.libraries.tests.core.base:96) - Starting test: plugin.core.libraries.tests.llist_:test_import
2016-07-07 11:57:31,764 - plugin.core.libraries.manager    (-8f17900) :  INFO (plugin.core.libraries.manager:109) - llist: available
2016-07-07 11:57:31,765 - plugin.core.libraries.tests.core.base (-8f17900) :  DEBUG (plugin.core.libraries.tests.core.base:96) - Starting test: plugin.core.libraries.tests.openssl_:test_import
2016-07-07 11:57:31,838 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  DEBUG (requests.packages.urllib3.connectionpool:395) - "POST /api/1/store/ HTTP/1.1" 200 41
2016-07-07 11:57:31,842 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:57:31,842 - root                             (-8f17900) :  WARNING (root:1601) - openssl: unavailable - libffi.so.6: cannot open shared object file: No such file or directory
2016-07-07 11:57:31,844 - plugin.core.logger.handlers.error_reporter.ErrorReporter (-8f17900) :  DEBUG (plugin.core.logger.handlers.error_reporter.ErrorReporter:610) - Sending message of length 1096 to threaded+requests+http://sentry.skipthe.net/api/1/store/
2016-07-07 11:57:31,950 - plugin.core.helpers              (-8f17900) :  INFO (plugin.core.helpers:19) - Using 'simplejson' module for JSON serialization
2016-07-07 11:57:32,162 - plugin.core.helpers.database     (-8f17900) :  DEBUG (plugin.core.helpers.database:20) - Connected to database at '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.trakttv.db'
2016-07-07 11:57:32,225 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  DEBUG (requests.packages.urllib3.connectionpool:395) - "POST /api/1/store/ HTTP/1.1" 200 41
2016-07-07 11:57:32,291 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.timeline.created'], func: <bound method Metadata.timeline_created of <plex_metadata.metadata.Metadata object at 0x93724cc>>)
2016-07-07 11:57:32,292 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.timeline.deleted'], func: <bound method Metadata.timeline_deleted of <plex_metadata.metadata.Metadata object at 0x93724cc>>)
2016-07-07 11:57:32,292 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.timeline.finished'], func: <bound method Metadata.timeline_finished of <plex_metadata.metadata.Metadata object at 0x93724cc>>)
2016-07-07 11:57:32,354 - plex_database.core.database      (-8f17900) :  DEBUG (plex_database.core.database:17) - Connecting to '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db'
2016-07-07 11:57:32,427 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.scanner.finished'], func: <bound method LibraryUpdateTrigger.trigger of <plugin.sync.triggers.library_update.LibraryUpdateTrigger object at 0x95a68ec>>)
2016-07-07 11:57:32,427 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.timeline.loading'], func: <bound method LibraryUpdateTrigger.trigger of <plugin.sync.triggers.library_update.LibraryUpdateTrigger object at 0x95a68ec>>)
2016-07-07 11:57:32,427 - pyemitter                        (-8f17900) :  DEBUG (pyemitter:45) - [plex_activity.activity.Activity   ]:on(events: ['websocket.timeline.finished'], func: <bound method LibraryUpdateTrigger.trigger of <plugin.sync.triggers.library_update.LibraryUpdateTrigger object at 0x95a68ec>>)
2016-07-07 11:57:32,429 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:57:32,491 - com.plexapp.plugins.trakttv      (-8f17900) :  DEBUG (com.plexapp.plugins.trakttv:640) - Adding a prefix handler for 'Trakt.tv' ('/video/trakt')
2016-07-07 11:57:32,547 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:93) - Loaded the dictionary file
2016-07-07 11:57:32,572 - com.plexapp.plugins.trakttv      (-8f17900) :  DEBUG (com.plexapp.plugins.trakttv:69) - Exposing function Api for remote access
2016-07-07 11:57:32,573 - plugin.core.singleton            (-8f17900) :  DEBUG (plugin.core.singleton:92) - Starting server (port: 35374)...
2016-07-07 11:57:32,573 - plugin.core.singleton            (-8f17900) :  DEBUG (plugin.core.singleton:110) - Started
2016-07-07 11:57:32,574 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:72) - Initialized logging (report: True, storage: True)
2016-07-07 11:57:32,574 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:13) - ==================================================
2016-07-07 11:57:32,574 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | Trakt.tv
2016-07-07 11:57:32,575 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | https://github.com/trakt/Plex-Trakt-Scrobbler
2016-07-07 11:57:32,575 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:13) - --------------------------------------------------
2016-07-07 11:57:32,575 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | Current Version: v1.0.3.3-master
2016-07-07 11:57:32,575 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:13) - --------------------------------------------------
2016-07-07 11:57:32,576 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | core.header
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | core.helpers
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | core.logger
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | core.update_checker
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | interface.m_main
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | interface.m_messages
2016-07-07 11:57:32,577 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | interface.m_sync
2016-07-07 11:57:32,578 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:9) - | interface.resources
2016-07-07 11:57:32,578 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:13) - ==================================================
2016-07-07 11:57:32,578 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'pyemitter' logger level to INFO
2016-07-07 11:57:32,578 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'trakt' logger level to INFO
2016-07-07 11:57:32,578 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'plex' logger level to INFO
2016-07-07 11:57:32,579 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'com.plexapp.plugins.trakttv' logger level to INFO
2016-07-07 11:57:32,579 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'plex_activity' logger level to INFO
2016-07-07 11:57:32,579 - plugin.core.logger.main          (-8f17900) :  DEBUG (plugin.core.logger.main:159) - Changed 'plugin' logger level to INFO
2016-07-07 11:57:32,580 - trakt.core.http                  (-8f17900) :  INFO (trakt.core.http:136) - Rebuilding session and connection pools...
2016-07-07 11:57:32,589 - plugin                           (-8f17900) :  INFO (plugin:19) - Initialized 1 modules: UpdateChecker
2016-07-07 11:57:32,595 - plugin                           (-c5da4c0) :  INFO (plugin:19) - X-Plex-Token: available
2016-07-07 11:57:32,595 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:611) - Started plug-in
2016-07-07 11:57:32,596 - requests.packages.urllib3.connectionpool (-c5da4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): 127.0.0.1
2016-07-07 11:57:32,597 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:184) - Socket server started on port 49718
2016-07-07 11:57:32,597 - com.plexapp.plugins.trakttv      (-8f17900) :  INFO (com.plexapp.plugins.trakttv:25) - Entering run loop
2016-07-07 11:57:32,790 - plugin.core.helpers.thread       (-c5da4c0) :  ERROR (plugin.core.helpers.thread:103) - Unable to start <class 'plugin.modules.migrations.main.Migrations'> module: SQLError: unsupported file format
Traceback (most recent call last):
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/core/helpers/thread.py", line 98, in module_start
    f_start()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/main.py", line 25, in start
    db.execute_sql('PRAGMA journal_mode=WAL;')
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 103, in execute_sql
    self._execute_sql(cursor, sql, params)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 95, in _execute_sql
    cursor.execute(sql, params or ())
  File "src/cursor.c", line 1019, in APSWCursor_execute.sqlite3_prepare
  File "src/statementcache.c", line 386, in sqlite3_prepare
SQLError: SQLError: unsupported file format
2016-07-07 11:57:32,796 - plugin.core.helpers              (-c5da4c0) :  ERROR (plugin.core.helpers:19) - Exception raised in thread "main": SQLError: unsupported file format
Traceback (most recent call last):
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/core/helpers.py", line 267, in thread_wrapper
    func(*args, **kwargs)
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 19, in _apply
    return apply(f, args, kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/main.py", line 161, in run
    module_start()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/core/helpers/thread.py", line 103, in module_start
    log.error('Unable to start %r module: %s', kls, ex, exc_info=True)
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/logging/__init__.py", line 1175, in error
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/logging/__init__.py", line 1268, in _log
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/logging/__init__.py", line 1278, in handle
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/logging/__init__.py", line 1318, in callHandlers
  File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-synology-i686/output/pms-depends-linux-synology-i686-release-e61e4c3/lib/python2.7/logging/__init__.py", line 749, in handle
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/core/logger/handlers/error_storage.py", line 16, in emit
    ExceptionManager.create.from_exc_info(record.exc_info)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/exception.py", line 46, in from_exc_info
    exception.error = MessageManager.get.from_exception(exception)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/message.py", line 64, in from_exception
    description=exception.traceback
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/message.py", line 28, in _log
    **kwargs
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/core/base.py", line 38, in or_create
    return self.manager.create(**kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/core/base.py", line 54, in __call__
    obj = self.model.create(**kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 4088, in create
    inst.save(force_insert=True)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 4239, in save
    pk_from_cursor = self.insert(**field_dict).execute()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2945, in execute
    cursor = self._execute()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2455, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 103, in execute_sql
    self._execute_sql(cursor, sql, params)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 95, in _execute_sql
    cursor.execute(sql, params or ())
  File "src/cursor.c", line 1019, in APSWCursor_execute.sqlite3_prepare
  File "src/statementcache.c", line 386, in sqlite3_prepare
SQLError: SQLError: unsupported file format
2016-07-07 11:57:32,834 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:57:33,230 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:57:37,576 - com.plexapp.plugins.trakttv      (-bbca4c0) :  INFO (com.plexapp.plugins.trakttv:131) - Saved the dictionary file
2016-07-07 11:58:00,203 - com.plexapp.plugins.trakttv      (-bbca4c0) :  ERROR (com.plexapp.plugins.trakttv:117) - Unable to process API request (args: ('system.ping',), kwargs: {}) - SQLError: unsupported file format
2016-07-07 11:58:00,206 - root                             (-bbca4c0) :  INFO (root:1611) - 304 GET /:/plugins/com.plexapp.plugins.trakttv/messaging/function/TWVzc2FnZUtpdDpBcGk_/Y2VyZWFsMQoxCmxpc3QKMQpzMTEKc3lzdGVtLnBpbmdyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_ (127.0.0.1) 20.73ms
2016-07-07 11:58:00,208 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:58:17,530 - root                             (-bbca4c0) :  INFO (root:1611) - 200 GET /video/trakt/:/prefs (127.0.0.1) 9.23ms
2016-07-07 11:58:57,684 - plugin.modules.migrations.account (-bbca4c0) :  INFO (plugin.modules.migrations.account:244) - Plex Token: environment
2016-07-07 11:58:57,686 - com.plexapp.plugins.trakttv      (-bbca4c0) :  CRITICAL (com.plexapp.plugins.trakttv:303) - Exception when calling function 'ValidatePrefs' (most recent call last):
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/__init__.py", line 126, in ValidatePrefs
    last_activity_mode = Preferences.get('activity.mode')
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/preferences/main.py", line 30, in get
    option = OPTIONS_BY_KEY[key].get(account)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/preferences/options/core/base/simple.py", line 48, in get
    'value': self._pack(self.default),
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 4106, in get_or_create
    return sq.get(), False
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2725, in get
    return clone.execute().next()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2769, in execute
    self._qr = ResultWrapper(model_class, self._execute(), query_meta)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2455, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 103, in execute_sql
    self._execute_sql(cursor, sql, params)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 95, in _execute_sql
    cursor.execute(sql, params or ())
  File "src/cursor.c", line 1019, in APSWCursor_execute.sqlite3_prepare
  File "src/statementcache.c", line 386, in sqlite3_prepare
SQLError: SQLError: unsupported file format

2016-07-07 11:58:57,729 - root                             (-bbca4c0) :  INFO (root:1611) - 200 GET /video/trakt/:/prefs/set?activity_mode=0&pin=6370e332 (127.0.0.1) 46.58ms
2016-07-07 11:58:57,729 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:58:59,422 - com.plexapp.plugins.trakttv      (-bbca4c0) :  CRITICAL (com.plexapp.plugins.trakttv:889) - Exception (most recent call last):
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/handlers/base.py", line 111, in call
    result = self.func(*args, **kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/m_main.py", line 18, in MainMenu
    m_count, m_type = MessageStatus(viewed=False)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/m_messages.py", line 164, in Status
    for message in messages:
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 107, in <lambda>
    _getiter_           = lambda x: x.__iter__(),
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2776, in __iter__
    return iter(self.execute())
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2769, in execute
    self._qr = ResultWrapper(model_class, self._execute(), query_meta)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2455, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 103, in execute_sql
    self._execute_sql(cursor, sql, params)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 95, in _execute_sql
    cursor.execute(sql, params or ())
  File "src/cursor.c", line 1019, in APSWCursor_execute.sqlite3_prepare
  File "src/statementcache.c", line 386, in sqlite3_prepare
SQLError: SQLError: unsupported file format

2016-07-07 11:58:59,461 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 11:58:59,462 - com.plexapp.plugins.trakttv      (-bbca4c0) :  CRITICAL (com.plexapp.plugins.trakttv:122) - Exception when writing response for request '/video/trakt' (most recent call last):
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/interfaces/socketinterface.py", line 104, in _handle_request
    status, headers, body = type(self)._core.runtime.handle_request(self.request)
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 924, in handle_request
    self._core.log.debug("Response: [%d] %s%d bytes", status, (original_type.__name__ + ", ") if original_type else '', len(body))
UnboundLocalError: local variable 'body' referenced before assignment

2016-07-07 11:58:59,468 - root                             (-bbca4c0) :  INFO (root:1611) - 304 GET /video/trakt (127.0.0.1) 53.02ms
2016-07-07 11:59:04,866 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 12:00:18,883 - com.plexapp.plugins.trakttv      (-bbca4c0) :  ERROR (com.plexapp.plugins.trakttv:117) - Unable to process API request (args: ('system.ping',), kwargs: {}) - SQLError: unsupported file format
2016-07-07 12:00:18,910 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 12:00:18,911 - root                             (-bbca4c0) :  INFO (root:1611) - 304 GET /:/plugins/com.plexapp.plugins.trakttv/messaging/function/TWVzc2FnZUtpdDpBcGk_/Y2VyZWFsMQoxCmxpc3QKMQpzMTEKc3lzdGVtLnBpbmdyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_ (127.0.0.1) 30.49ms
2016-07-07 12:08:03,259 - com.plexapp.plugins.trakttv      (-bbca4c0) :  CRITICAL (com.plexapp.plugins.trakttv:889) - Exception (most recent call last):
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/handlers/base.py", line 111, in call
    result = self.func(*args, **kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/m_main.py", line 18, in MainMenu
    m_count, m_type = MessageStatus(viewed=False)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/m_messages.py", line 164, in Status
    for message in messages:
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 107, in <lambda>
    _getiter_           = lambda x: x.__iter__(),
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2776, in __iter__
    return iter(self.execute())
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2769, in execute
    self._qr = ResultWrapper(model_class, self._execute(), query_meta)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/peewee.py", line 2455, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 103, in execute_sql
    self._execute_sql(cursor, sql, params)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/playhouse/apsw_ext.py", line 95, in _execute_sql
    cursor.execute(sql, params or ())
  File "src/cursor.c", line 1019, in APSWCursor_execute.sqlite3_prepare
  File "src/statementcache.c", line 386, in sqlite3_prepare
SQLError: SQLError: unsupported file format

2016-07-07 12:08:03,297 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
2016-07-07 12:08:03,299 - com.plexapp.plugins.trakttv      (-bbca4c0) :  CRITICAL (com.plexapp.plugins.trakttv:122) - Exception when writing response for request '/video/trakt' (most recent call last):
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/interfaces/socketinterface.py", line 104, in _handle_request
    status, headers, body = type(self)._core.runtime.handle_request(self.request)
  File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 924, in handle_request
    self._core.log.debug("Response: [%d] %s%d bytes", status, (original_type.__name__ + ", ") if original_type else '', len(body))
UnboundLocalError: local variable 'body' referenced before assignment

2016-07-07 12:08:03,304 - root                             (-bbca4c0) :  INFO (root:1611) - 304 GET /video/trakt (127.0.0.1) 47.73ms
2016-07-07 12:08:03,704 - requests.packages.urllib3.connectionpool (-b8dc4c0) :  INFO (requests.packages.urllib3.connectionpool:213) - Starting new HTTP connection (1): sentry.skipthe.net
fuzeman commented 8 years ago

This error appears to be caused when the sqlite library is downgraded, not sure how this would of happened on your system though...


The easiest solution is probably just resetting the plugin by following these steps:

  1. Shutdown Plex Media Server
  2. Delete the plugin database, located at:

    Plug-in Support\Databases\com.plexapp.plugins.trakttv.db
    Plug-in Support\Databases\com.plexapp.plugins.trakttv.db-shm
    Plug-in Support\Databases\com.plexapp.plugins.trakttv.db-wal
  3. Delete the plugin caches, located at:

    Plug-in Support\Caches\com.plexapp.plugins.trakttv
  4. Start Plex Media Server
  5. Verify plugin configuration is correct (some settings might be lost after resetting the plugin)

Note: The Plug-in Support directory is likely located at /volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support on your system.

ronilaukkarinen commented 8 years ago

Having the same problem. @fuzeman Didn't have any com.plexapp.plugins.trakttv.db files in that folder, so removed all the db files, had to readd the libraries. Let's see if this works.

felixherzog commented 8 years ago

Thanks a lot for the prompt answer!

It seems to work now!

Felix Herzog Betriebsökonom HWV Geschäftsleiter Burckhardt Immobilien AG Dornacherstrasse 210 CH 4002 Basel Tel : +41 61 338 35 35 Fax : +41 61 338 35 36 Direktwahl +41 61 338 35 65 felix.herzog@b-immo.ch

Schlossgasse Riehen – 10 Einfamilienhäuser an privilegierter Lage www.schlossgasse-riehen.chhttp://www.schlossgasse-riehen.ch Sky Lights Schoren – Erstvermietung im Hirzbrunnenquartier www.skylights-schoren.ch HÜBELI – wohnen mittendrin – Verkauf Eigentumswohnungen Aesch www.huebeli-aesch.chhttp://www.huebeli-aesch.ch/ Urban natürlich wohnen – Verkauf Einfamilienhäuser und Wohnungen im Hirzbrunnen www.schorenstadt.chhttp://www.schorenstadt.ch/

Von: Dean Gardiner [mailto:notifications@github.com] Gesendet: Samstag, 9. Juli 2016 13:45 An: trakt/Plex-Trakt-Scrobbler Plex-Trakt-Scrobbler@noreply.github.com Cc: felixherzog felix.herzog@bluewin.ch; Author author@noreply.github.com Betreff: Re: [trakt/Plex-Trakt-Scrobbler] Trakt will not update from Plex (SQLError: unsupported file format) (#340)

This error appears to be caused when the sqlite library is downgraded, not sure how this would of happened on your system though...


The easiest solution is probably just resetting the plugin by following these steps:

  1. Shutdown Plex Media Server
  2. Delete the plugin database, located at:
  3. Plug-in Support\Databases\com.plexapp.plugins.trakttv.db
  4. Plug-in Support\Databases\com.plexapp.plugins.trakttv.db-shm
  5. Plug-in Support\Databases\com.plexapp.plugins.trakttv.db-wal
  6. Delete the plugin caches, located at:
  7. Plug-in Support\Caches\com.plexapp.plugins.trakttv
    1. Start Plex Media Server
    2. Verify plugin configuration is correct (some settings might be lost after resetting the plugin)

Note: The Plug-in Support directory is likely located at /volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support on your system.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/trakt/Plex-Trakt-Scrobbler/issues/340#issuecomment-231530340, or mute the threadhttps://github.com/notifications/unsubscribe/ATaHQ0kPbNp2rbVnYSH__0ExZVYgRPNFks5qT4mlgaJpZM4JHv2I.