Broken Glitter-Theme in Xenial PPA

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
yopah
Newbie
Newbie
Posts: 2
Joined: March 25th, 2016, 9:14 am

Broken Glitter-Theme in Xenial PPA

Post by yopah »

Bootstrap appears to be missing from sabnzbdplus-theme-glitter, therefore we get:

Code: Select all

2016-03-25 13:58:36,331::ERROR::[_cplogging:216] [25/Mar/2016:13:58:36] HTTP
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/share/sabnzbdplus/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/sabnzbdplus/sabnzbd/interface.py", line 349, in index
    return template.respond()
  File "_usr_share_sabnzbdplus_interfaces_Glitter_templates_main_tmpl.py", line 453, in respond
  File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1610, in _handleCheetahInclude
    self._CHEETAH__cheetahIncludes[_includeID] = self.getFileContents(path)
  File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1426, in getFileContents
    fp = open(path, 'r')
IOError: [Errno 2] No such file or directory: '/usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap/js/bootstrap.min.js'
Manually downloading the latest bootstrap and unzipping it to that directory does fix this issue (the theme is still visually broken in the settings page though).

On another note, SHA1 appears to have been phased-out by SHA256, hence we now get this:

Code: Select all

W: gpgv:/var/lib/apt/lists/partial/ppa.launchpad.net_jcfp_ppa_ubuntu_dists_xenial_InRelease: The repository is insufficiently signed by key 98703123E0F52B2BE16D586EF13930B14BB9F05F (weak digest)
Not really running Xenial, just Debian Testing, nevertheless I thought you should know about this issues.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by shypike »

First part:
Likely a job for the packager, but I'll check whether our source package is complete.

Second part.
Yes, we know.
We'll fix that in 1.0.1 but you'll have to remove the certificate files before upgrading.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by shypike »

The list of files starting from Glitter/templates should be:"

Code: Select all

history.tmpl
include_history.tmpl
include_menu.tmpl
include_messages.tmpl
include_modals.tmpl
include_queue.tmpl
main.tmpl
nzo.tmpl
queue.tmpl
static
status.tmpl
static/bootstrap
static/images
static/javascripts
static/stylesheets
static/bootstrap/css
static/bootstrap/fonts
static/bootstrap/js
static/bootstrap/css/bootstrap.min.css
static/bootstrap/fonts/glyphicons-halflings-regular.eot
static/bootstrap/fonts/glyphicons-halflings-regular.svg
static/bootstrap/fonts/glyphicons-halflings-regular.ttf
static/bootstrap/js/bootstrap.min.js
static/images/logo-small.png
static/images/logo.png
static/javascripts/date.min.js
static/javascripts/glitter.js
static/javascripts/jquery-1.11.2.min.js
static/javascripts/jquery-ui.min.js
static/javascripts/jquery.peity.min.js
static/javascripts/knockout-extensions.js
static/javascripts/knockout-latest.js
static/javascripts/moment.js
static/javascripts/momentjs_locale
static/javascripts/momentjs_locale/da.js
static/javascripts/momentjs_locale/de.js
static/javascripts/momentjs_locale/es.js
static/javascripts/momentjs_locale/fi.js
static/javascripts/momentjs_locale/fr.js
static/javascripts/momentjs_locale/nb.js
static/javascripts/momentjs_locale/nl.js
static/javascripts/momentjs_locale/pl.js
static/javascripts/momentjs_locale/pt-br.js
static/javascripts/momentjs_locale/ro.js
static/javascripts/momentjs_locale/ru.js
static/javascripts/momentjs_locale/sr.js
static/javascripts/momentjs_locale/sv.js
static/javascripts/momentjs_locale/zh-cn.js
static/stylesheets/colorschemes
static/stylesheets/glitter.css
static/stylesheets/glitter.mobile.css
static/stylesheets/colorschemes/Default.css
static/stylesheets/colorschemes/Night.css
yopah
Newbie
Newbie
Posts: 2
Joined: March 25th, 2016, 9:14 am

Re: Broken Glitter-Theme in Xenial PPA

Post by yopah »

@shypike Thank you for your time, I've checked that file list and now I have all files.
I was actually just trying to report the issue to @jcfp (the package mantainer). I think he is relying on libjs-bootstrap to provide bootstrap, which does get installed in Debian testing, but doesn't really work-out like expected (it seems).

On another note, knowing the packages from trusty work fine (and should provide the same version), I tried installing just the sabnzbdplus-theme-glitter package from trusty (in hopes that would fix the issues). This solved the bootstrap problem, but the settings page was still visually broken. Those cosmetic issues were only solved once I installed the sabnzbd package from trusty.

I need to test how it works on the actual Ubuntu, but for now only trusty is working on Debian (testing).
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by jcfp »

Thanks for the report but I cannot reproduce this in xenial. Libjs-bootstrap is indeed used to provide the bootstrap files, but I'm not getting any errors and the web interface looks normal. The file from the error message in the topic start is also present as it should be:
ubuntu@ubuntu:~$ ls -la /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap/js/bootstrap.min.js
-rw-r--r-- 1 root root 46649 dec 20 00:20 /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap/js/bootstrap.min.js

# ...where bootstrap is linked like this:
ubuntu@ubuntu:~$ ls -la /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap
lrwxrwxrwx 1 root root 35 dec 9 13:39 /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap -> ../../../../../javascript/bootstrap
As for the ppa still signed with sha1: out of my hands, but apparently a fix is in the works. See LP bug 1556666.
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by jcfp »

Finally managed to get this to reproduce after all. Should be fixed by a workaround in tonight's upload.
MoiZie2
Newbie
Newbie
Posts: 2
Joined: May 7th, 2016, 3:58 am

Re: Broken Glitter-Theme in Xenial PPA

Post by MoiZie2 »

Stumbled upon this thread after upgrading to the current release, causes the bug to appear for me.

/usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap/js$ ls -al
total 12
drwxr-xr-x 2 root root 4096 mei 7 10:55 .
drwxr-xr-x 5 root root 4096 mei 7 10:55 ..
lrwxrwxrwx 1 root root 61 mei 7 10:26 bootstrap.min.js -> ../../../../../../../javascript/bootstrap/js/bootstrap.min.js

And if I go to ../../../../../../../javascript/bootstrap/js/

there is no bootstrap.min.js:

/usr/share/javascript/bootstrap/js$ ls -al
total 76
drwxr-xr-x 2 root root 4096 mei 7 10:45 .
drwxr-xr-x 6 root root 4096 okt 2 2015 ..
-rw-r--r-- 1 root root 68908 dec 20 00:20 bootstrap.js

Even tried reinstalling / purging / etcetera of sabnzbd and theme-glitter deb packages, but alas...
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by jcfp »

I finally had a good chat on irc with a user affected by this issue yesterday. For now, I'm inclined to believe this bug is somewhere in debhelper/dh_link and triggered when upgrading sab between certain ppa releases.

Anyway, if you get hit by this after updating, run this to fix the bootstrap error:

Code: Select all

sudo apt-get install --reinstall libjs-bootstrap
vdown
Release Testers
Release Testers
Posts: 38
Joined: January 30th, 2008, 8:01 am

Re: Broken Glitter-Theme in Xenial PPA

Post by vdown »

Thanks, that fixed it for me.
MoiZie2
Newbie
Newbie
Posts: 2
Joined: May 7th, 2016, 3:58 am

Re: Broken Glitter-Theme in Xenial PPA

Post by MoiZie2 »

Can also confirm that this command fixes the error :)
Smicke
Newbie
Newbie
Posts: 1
Joined: May 7th, 2016, 7:48 am

Re: Broken Glitter-Theme in Xenial PPA

Post by Smicke »

I had the same problem and yes, that fixed it. Also got new packages today.


But, I know have this is the GUI. I can clear it but it reappears all the time. sabnzbd seems to work.

Code: Select all

07/05/2016 14:45 [07/May/2016:14:45:06] ENGINE UnboundLocalError("local variable 'k' referenced before assignment",)
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 1359, in communicate
    req.parse_request()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 630, in parse_request
    success = self.read_request_headers()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 746, in read_request_headers
    read_headers(self.rfile, self.inheaders)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/wsgiserver2.py", line 266, in read_headers
    if k in comma_separated_headers:
UnboundLocalError: local variable 'k' referenced before assignment
EDIT: I found the problem! Munin was configured to monitor Squeezebox (I don't even use that) at port 9090 where I run sabnzbd. I installed munin in the same time frame when glitter got broken so I did not make the connection before. Removed squeezebox monitor in munin and the problem is gone. ;)
Last edited by Smicke on May 7th, 2016, 3:05 pm, edited 2 times in total.
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by jcfp »

Smicke wrote:But, I know have this is the GUI. I can clear it but it reappears all the time. sabnzbd seems to work.

Code: Select all

UnboundLocalError: local variable 'k' referenced before assignment
Seems unrelated, please open a separate thread to track that issue.
Yarda
Newbie
Newbie
Posts: 3
Joined: May 8th, 2016, 4:01 am

Re: Broken Glitter-Theme in Xenial PPA

Post by Yarda »

Yesterday i upgraded from 1.0.1 to 1.0.2, after that i received some errors about the Glitter theme. So i tried to reinstall, i purged everything and still have no luck. I can't even start sabnzbdplus after a clean install, i'm running Xenial ofcourse.
$ sabnzbdplus
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1244] --------------------------------
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1245] sabnzbdplus-1.0.2 (rev=b7e2bd96844d85623458ea5ad02432becdb199e5)
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1246] Full executable path = /usr/bin/sabnzbdplus
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1258] Platform = posix
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1259] Python-version = 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413]
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1260] Arguments = /usr/bin/sabnzbdplus
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1262] Preferred encoding = UTF-8
2016-05-08 10:53:59,753::INFO::[sabnzbdplus:1310] Read INI file /home/download/.sabnzbd/sabnzbd.ini
2016-05-08 10:53:59,754::INFO::[__init__:965] Loading data for queue9.sab from /home/download/.sabnzbd/admin/queue9.sab
2016-05-08 10:53:59,754::INFO::[__init__:968] /home/download/.sabnzbd/admin/queue9.sab missing
2016-05-08 10:53:59,754::INFO::[__init__:965] Loading data for queue8.sab from /home/download/.sabnzbd/admin/queue8.sab
2016-05-08 10:53:59,754::INFO::[__init__:968] /home/download/.sabnzbd/admin/queue8.sab missing
2016-05-08 10:53:59,754::INFO::[__init__:965] Loading data for queue7.sab from /home/download/.sabnzbd/admin/queue7.sab
2016-05-08 10:53:59,754::INFO::[__init__:968] /home/download/.sabnzbd/admin/queue7.sab missing
2016-05-08 10:53:59,763::INFO::[__init__:965] Loading data for rss_data.sab from /home/download/.sabnzbd/admin/rss_data.sab
2016-05-08 10:53:59,763::INFO::[__init__:968] /home/download/.sabnzbd/admin/rss_data.sab missing
2016-05-08 10:53:59,763::INFO::[__init__:965] Loading data for totals10.sab from /home/download/.sabnzbd/admin/totals10.sab
2016-05-08 10:53:59,763::INFO::[__init__:968] /home/download/.sabnzbd/admin/totals10.sab missing
2016-05-08 10:53:59,764::INFO::[__init__:965] Loading data for totals9.sab from /home/download/.sabnzbd/admin/totals9.sab
2016-05-08 10:53:59,764::INFO::[__init__:968] /home/download/.sabnzbd/admin/totals9.sab missing
2016-05-08 10:53:59,793::INFO::[postproc:89] Loading postproc queue
2016-05-08 10:53:59,793::INFO::[__init__:965] Loading data for postproc2.sab from /home/download/.sabnzbd/admin/postproc2.sab
2016-05-08 10:53:59,793::INFO::[__init__:968] /home/download/.sabnzbd/admin/postproc2.sab missing
2016-05-08 10:53:59,794::INFO::[__init__:965] Loading data for queue10.sab from /home/download/.sabnzbd/admin/queue10.sab
2016-05-08 10:53:59,794::INFO::[__init__:968] /home/download/.sabnzbd/admin/queue10.sab missing
2016-05-08 10:53:59,794::INFO::[__init__:965] Loading data for queue9.sab from /home/download/.sabnzbd/admin/queue9.sab
2016-05-08 10:53:59,794::INFO::[__init__:968] /home/download/.sabnzbd/admin/queue9.sab missing
2016-05-08 10:53:59,795::INFO::[__init__:965] Loading data for watched_data2.sab from /home/download/.sabnzbd/admin/watched_data2.sab
2016-05-08 10:53:59,795::INFO::[__init__:968] /home/download/.sabnzbd/admin/watched_data2.sab missing
2016-05-08 10:53:59,795::INFO::[__init__:965] Loading data for Rating.sab from /home/download/.sabnzbd/admin/Rating.sab
2016-05-08 10:53:59,796::INFO::[__init__:968] /home/download/.sabnzbd/admin/Rating.sab missing
2016-05-08 10:53:59,796::INFO::[scheduler:190] Setting schedule for midnight BPS reset
2016-05-08 10:53:59,796::INFO::[downloader:241] Resuming
2016-05-08 10:53:59,806::INFO::[__init__:350] All processes started
2016-05-08 10:53:59,806::INFO::[sabnzbdplus:356] Web dir is /usr/share/sabnzbdplus/interfaces/Glitter
2016-05-08 10:53:59,806::WARNING::[sabnzbdplus:363] Cannot find web template: /usr/share/sabnzbdplus/interfaces/Glitter/templates/main.tmpl, trying standard template
2016-05-08 10:53:59,807::ERROR::[sabnzbdplus:367] Cannot find standard template: /usr/share/sabnzbdplus/interfaces/Glitter
Traceback (most recent call last):
File "/usr/bin/sabnzbdplus", line 124, in <module>
import win32api
ImportError: No module named win32api
2016-05-08 10:53:59,811::INFO::[panic:270] Launching browser with /tmp/tmpaBzXhb.html
It seems there is still a problem with the Glitter theme.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Broken Glitter-Theme in Xenial PPA

Post by sander »

@Yarda: a few remarks based on your logging:

This is incorrect:

Code: Select all

Traceback (most recent call last):
File "/usr/bin/sabnzbdplus", line 124, in <module>
import win32api
ImportError: No module named win32api
That should not happen on a Linux platform

All the "/home/download/.sabnzbd/admin/... missing" lines are also strange. Can you download one NZB and after that restart SABnzbd? If you still have these lines afterwards, there is something wrong with your setup.

FWIW: I run SABnzbd 1.0.2 from PPA without problems on my Ubuntu 16.04 Xenial.
Yarda
Newbie
Newbie
Posts: 3
Joined: May 8th, 2016, 4:01 am

Re: Broken Glitter-Theme in Xenial PPA

Post by Yarda »

sander wrote:@Yarda: a few remarks based on your logging:

This is incorrect:

Code: Select all

Traceback (most recent call last):
File "/usr/bin/sabnzbdplus", line 124, in <module>
import win32api
ImportError: No module named win32api
That should not happen on a Linux platform

All the "/home/download/.sabnzbd/admin/... missing" lines are also strange. Can you download one NZB and after that restart SABnzbd? If you still have these lines afterwards, there is something wrong with your setup.

FWIW: I run SABnzbd 1.0.2 from PPA without problems on my Ubuntu 16.04 Xenial.
Well, it's a clean install and it fails to run, so i can't download anything or restart SABnzbd. The template isn't found so it can't run. It ran just fine until the update yesterday from 1.0.1 to 1.0.2, i really can't explain this. I guess that the "win32api" is just a python module.

-edit-
Ok, nevermind my problems. I purged everything, the ppa, the dependencies and started over again. After installing and enabling to run as service nothing happend after the first time time start, no webinterface, but it started! So i stopped the service and started it again without problems and the webinterface came up. At last i replaced the sabnzbd.ini with my own and it runs fine again. Still weird that the upgrade yesterday broke the interface giving a lot of errors of python files not being found. Anyway, sorry to have bothered you. :)
Last edited by Yarda on May 8th, 2016, 6:05 am, edited 1 time in total.
Post Reply