Failure to start due to syntax error in configuration file

Bug #216547 reported by chapterthree
4
Affects Status Importance Assigned to Milestone
LottaNZB
Fix Released
Medium
Andrew Williams

Bug Description

I have hellanzb 0.13 installed and fully configured. I installed LottaNZB 0.2 using the Ubuntu deb package. hellanzb was not running (wanted to take advantage of the full control option). After going through the configuration wizard (although not changing anything via the UI, it had picked up all of the appropriate settings from my hellanzb.conf), LottaNZB reported that hellanzb had crashed, and asked me if i wanted to restart it. I did so, and it reported it crashed again. I did that one more time, same crash, so I selected the quit option. When I then tried to launch LottaNZB again, it was silently failing when launching via Gnome menu entry.

$ lottanzb
INFO Starting LottaNZB 0.2 using Python 2.5.1.
Traceback (most recent call last):
  File "/usr/bin/lottanzb", line 6, in <module>
    Lotta()
  File "/var/lib/python-support/python2.5/lottanzb/lottanzb.py", line 57, in __init__
    Prefs.hella.load()
  File "/var/lib/python-support/python2.5/lottanzb/prefs.py", line 48, in load
    execfile(self.confFile)
  File "/home/ktrumbull/.lottanzb/hellanzb.conf", line 29
    Hellanzb.NZB_ZIPS = .nzb.zip
                        ^
SyntaxError: invalid syntax

(Looks like the font being used in this textarea is not monospace, so the syntax caret is not in the correct location. It is located at the leading dot in '.nzb.zip'.)

Here is the associated entry in ~/.hellanzb/hellanzb.conf:

# Support extracting NZBs from ZIP files with this suffix (case insensitive) in
# QUEUE_DIR. Defaults to '.nzb.zip'. Set to False to disable.
Hellanzb.NZB_ZIPS = '.nzb.zip'

# Support extracting NZBs from GZIP files with this suffix (case insensitive)
# in QUEUE_DIR. Defaults to '.nzb.gz'. Set to False to disable.
#Hellanzb.NZB_GZIPS = '.nzb.gz'

Looks like a configuration parsing issue (looks like it's not keeping the single quotes upon import).

Revision history for this message
chapterthree (chapterthree) wrote :

I manually added the single quotes to ~/.lottanzb/hellanzb.conf and confirmed that LottaNZB now starts up properly.

Revision history for this message
Andrew Williams (nikdoof) wrote :

The save() fuction in Prefs class isn't identifying if variables are bool, int, or string. So it's saving strings as unquoted text hence the failed message.

Changed in lottanzb:
assignee: nobody → nikdoof
importance: Undecided → Medium
status: New → In Progress
Changed in lottanzb:
status: In Progress → Fix Committed
Severin H (severinh)
Changed in lottanzb:
milestone: none → 0.2.1
Revision history for this message
Severin H (severinh) wrote :

This bug didn't show up because the type of variables isn't identified. Every variable is mapped to a certain type in HellaPrefs.*_PREFS. Some of them were just in the wrong category.

Severin H (severinh)
Changed in lottanzb:
milestone: 0.2.1 → 0.3
Severin H (severinh)
Changed in lottanzb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.