Crash on first run

Bug #225983 reported by sparks
4
Affects Status Importance Assigned to Milestone
LottaNZB
Fix Released
Medium
LottaNZB Development Team

Bug Description

INFO Starting LottaNZB 0.2 using Python 2.5.2.
INFO The LottaNZB configuration could not be loaded. Starting configuration assistant.
INFO Created the LottaNZB directory /home/sparks/.lottanzb/.
Traceback (most recent call last):
  File "/usr/bin/lottanzb", line 8, in <module>
    load_entry_point('lottanzb==0.2', 'gui_scripts', 'lottanzb')()
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/lottanzb.py", line 63, in run
    Lotta()
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/lottanzb.py", line 48, in __init__
    self.assistant = firstrun.Assistant(True)
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/firstrun.py", line 46, in __init__
    self.showUsageHint()
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/firstrun.py", line 132, in showUsageHint
    if Backend.isRunning():
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/backend.py", line 384, in isRunning
    list = util.ProcessList()
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/util.py", line 319, in __init__
    process = Process(int(f))
  File "/usr/lib/python2.5/site-packages/lottanzb-0.2-py2.5.egg/lottanzb/util.py", line 285, in __init__
    self.parent_pid = int(parent_pid)
ValueError: invalid literal for int() with base 10: 'S'

After messing witht he code in util.py I found out it was expecting a number but was receiving the letter 'S'

I changed the following and it fixed it.

:283
                self.state = state
                try:
                        self.parent_pid = int(parent_pid)
                except ValueError:
                        self.parent_pid = 0
                self.parent = None

Changed in lottanzb:
status: New → Fix Released
Revision history for this message
Severin H (severinh) wrote :

Hi sparks,

thanks a lot for your bug report and for the patch. I just applied it to both the main branch and the modes-module branch, which I'm currently working on.

The ProcessList class is used to detect whether a certain python application is running or not, but it's far from perfect and it won't work in all usage scenarios, that's why I'm currently trying to get rid of it in most places of the application.

Changed in lottanzb:
assignee: nobody → lottanzb
milestone: none → 0.2.1
status: Fix Released → Fix Committed
importance: Undecided → Medium
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.