Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database error: ambiguous column name: on_pause #2183

Closed
jpoggi opened this issue Oct 26, 2023 · 8 comments
Closed

Database error: ambiguous column name: on_pause #2183

jpoggi opened this issue Oct 26, 2023 · 8 comments

Comments

@jpoggi
Copy link

jpoggi commented Oct 26, 2023

Describe the Bug

Hi,

I have just updated to the latest version of Docker's container of tautulli v2.13.2, and at the startup the container crash.

Here is my docker compose stack startup logs:

tautulli  | usermod: no changes
tautulli  | Running Tautulli using user tautulli (uid=1000) and group tautulli (gid=1000)
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Starting Tautulli v2.13.2
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : [Docker] Linux 5.15.0-87-generic (#97-Ubuntu SMP Mon Oct 2 21:09:21 UTC 2023 - Debian GNU/Linux 12 bookworm)
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Europe/Paris (UTC+0200)
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Python 3.9.18 (main, Oct 11 2023, 23:49:58) [GCC 12.2.0]
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : SQLite 3.40.1
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Program Dir: /app
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Config File: /config/config.ini
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Database File: /config/tautulli.db
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Checking if the database upgrades are required...
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Checking if configuration upgrades are required...
tautulli  | 2023-10-26 22:42:26 - DEBUG :: MainThread : Using cached GitHub version data
tautulli  | 2023-10-26 22:42:26 - DEBUG :: MainThread : Latest version is c215afbf84baafb1a2020c2dc6e36944a6de1504
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Tautulli is up to date
tautulli  | 2023-10-26 22:42:26 - INFO :: Thread-1 : Tautulli PlexTV :: Requesting resources for server...
tautulli  | 2023-10-26 22:42:26 - INFO :: Thread-1 : Tautulli PlexTV :: Pinging Plex.tv to refresh token.
tautulli  | 2023-10-26 22:42:26 - INFO :: MainThread : Tautulli NotificationHandler :: Starting background notification handler (2 threads).
tautulli  | 2023-10-26 22:42:26 - ERROR :: MainThread : Tautulli Database :: Database error: ambiguous column name: on_pause
tautulli  | 2023-10-26 22:42:26 - ERROR :: MainThread : Uncaught exception: Traceback (most recent call last):
tautulli  |   File "/app/Tautulli.py", line 324, in <module>
tautulli  |     main()
tautulli  |   File "/app/Tautulli.py", line 247, in main
tautulli  |     plexpy.start()
tautulli  |   File "/app/plexpy/__init__.py", line 569, in start
tautulli  |     notifiers.check_browser_enabled()
tautulli  |   File "/app/plexpy/notifiers.py", line 4483, in check_browser_enabled
tautulli  |     for n in get_notifiers():
tautulli  |   File "/app/plexpy/notifiers.py", line 510, in get_notifiers
tautulli  |     result = db.select(
tautulli  |   File "/app/plexpy/database.py", line 455, in select
tautulli  |     sql_results = self.action(query, args).fetchall()
tautulli  |   File "/app/plexpy/database.py", line 433, in action
tautulli  |     sql_result = c.execute(query, args)
tautulli  | sqlite3.OperationalError: ambiguous column name: on_pause
tautulli  | 
tautulli  | Traceback (most recent call last):
tautulli  |   File "/app/Tautulli.py", line 324, in <module>
tautulli  |     main()
tautulli  |   File "/app/Tautulli.py", line 247, in main
tautulli  |     plexpy.start()
tautulli  |   File "/app/plexpy/__init__.py", line 569, in start
tautulli  |     notifiers.check_browser_enabled()
tautulli  |   File "/app/plexpy/notifiers.py", line 4483, in check_browser_enabled
tautulli  |     for n in get_notifiers():
tautulli  |   File "/app/plexpy/notifiers.py", line 510, in get_notifiers
tautulli  |     result = db.select(
tautulli  |   File "/app/plexpy/database.py", line 455, in select
tautulli  |     sql_results = self.action(query, args).fetchall()
tautulli  |   File "/app/plexpy/database.py", line 433, in action
tautulli  |     sql_result = c.execute(query, args)
tautulli  | sqlite3.OperationalError: ambiguous column name: on_pause$

Steps to Reproduce

  1. Update to the v2.13.2 version of Tautulli's container.

Expected Behavior

Tautulli to correctly startup :-)

Screenshots

No response

Relevant Settings

Here is some relevant informations.

john@doe:~$ docker version
Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
john@doe:~$ docker compose version
Docker Compose version v2.23.0
services:
  tautulli:
    container_name: tautulli
    image: ghcr.io/tautulli/tautulli:v2.13.2
    restart: unless-stopped
    mem_limit: 512m
    ports:
      - '8181:8181'
    environment:
      TZ: Europe/Paris
      PUID: 1000
      PGID: 1000
    volumes:
      - ~/config:/config

Tautulli Version

v2.13.2

Git Branch

master

Git Commit Hash

6d85836

Platform and Version

Ubuntu Server 22.04.3

Python Version

3.9.18

Browser and Version

Firefox 119.0

Link to Logs

https://gist.github.com/jpoggi/db3eef517e1b7fbfa59606ee1acce31f

@jpoggi
Copy link
Author

jpoggi commented Oct 26, 2023

I have rollback to the previous version used, v2.13.1 and the container is correctly starting.

By the way the commit hash is from the previous version too, I can't get it from the latest version as the container crash.

@JonnyWong16
Copy link
Contributor

@jpoggi
Copy link
Author

jpoggi commented Oct 26, 2023

Ok not a problem with Tautulli directly but the database.

Solution found on Discord.

DROP TABLE notify_log

Thanks @JonnyWong16

@jpoggi jpoggi closed this as completed Oct 26, 2023
@fryfrog
Copy link

fryfrog commented Oct 27, 2023

This sorted me out too, thanks!

@bitchkat
Copy link

bitchkat commented Oct 28, 2023

I fixed it a separate way before seeing this issue

`def qualify_notifier(notifier):
return 'notifiers.' + notifier

def get_notifiers(notifier_id=None, notify_action=None):
notify_actions = get_notify_actions()
notify_actions = map(qualify_notifier, notify_actions)
`
Note: I'm not a python expert by any means so I'm sure that can be simplified.

@garrettben
Copy link

@JonnyWong16 Thanks, I only checked open issues before I opened mine, will check closed next time. Fixed with DROP TABLE notify_log

@JamminR
Copy link

JamminR commented Nov 11, 2023

I'm not running Python or SQL.
I'm running the Tautulli Win exe.
How does someone with the above statements fix this error other than running an old version?
I clicked the discord link and this appears -
image
Do we wait until a new release is compiled?

@JonnyWong16
Copy link
Contributor

Use DB Browser for SQLite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants