5-a-day crash when adding bug

Bug #228329 reported by Mike Basinger
6
Affects Status Importance Assigned to Milestone
five-a-day
Fix Released
Undecided
Unassigned

Bug Description

5-a-day crashes when trying to add a bug. Using 5-a-day updated as of 5/8/2008.

Using Ubuntu 8.04-amd64

dbasinge@mikebuntu:~$ 5-a-day --add 226981
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 78, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 67, in update_team_file
    if tf.teams and tof.overview[files.get_lpid()] != tf.teams:
KeyError: 'mike.basinger'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 78, in apport_excepthook
    report_file = open(pr_filename, 'wt')
IOError: [Errno 13] Permission denied: '/var/crash/_usr_bin_5-a-day.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 78, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 67, in update_team_file
    if tf.teams and tof.overview[files.get_lpid()] != tf.teams:
KeyError: 'mike.basinger'

Related branches

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Did you add your SSH key to your Launchpad profile? It looks like that's causing the problems, since its required to have an SSH key in your LP profile before you can upload to a bzr branch in Launchpad, which is actually how five-a-day works.

Revision history for this message
Mike Basinger (mike.basinger) wrote :

My ssh key is in Launchpad. The problem started when I switched to Ubuntu 8.04 amd64.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Can you try 0.35?

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Slightly different error:

basinge@mikebuntu:~$ 5-a-day --add 226981
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
TypeError: add() takes exactly 2 arguments (3 given)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 78, in apport_excepthook
    report_file = open(pr_filename, 'wt')
IOError: [Errno 13] Permission denied: '/var/crash/_usr_bin_5-a-day.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
TypeError: add() takes exactly 2 arguments (3 given)

Revision history for this message
Daniel Holbach (dholbach) wrote :

Ugh, I'm an idiot - try 0.36 - it should be up in a bit.

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Slightly different error.
dbasinge@mikebuntu:~/.ssh$ 5-a-day --add 226981
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
  File "/usr/lib/python2.5/site-packages/fiveaday/files.py", line 73, in add
    f = open(teamoverviewfile, "a")
NameError: global name 'teamoverviewfile' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 78, in apport_excepthook
    report_file = open(pr_filename, 'wt')
IOError: [Errno 13] Permission denied: '/var/crash/_usr_bin_5-a-day.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
  File "/usr/lib/python2.5/site-packages/fiveaday/files.py", line 73, in add
    f = open(teamoverviewfile, "a")
NameError: global name 'teamoverviewfile' is not defined

Revision history for this message
Daniel Holbach (dholbach) wrote :

I'm sorry you have to go through this and I really wonder why none of these bugs have been triggered before. I'll upload 0.37 shortly - maybe you can test it and report back?

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Glad to help, I do hope it is not stupidity on my part (did double check my ssh keys:)). Here is the latest error, slightly different.

dbasinge@mikebuntu:~$ 5-a-day --add 226981Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
  File "/usr/lib/python2.5/site-packages/fiveaday/files.py", line 74, in add
    f = open(tof_name, "a")
NameError: global name 'tof_name' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 78, in apport_excepthook
    report_file = open(pr_filename, 'wt')
IOError: [Errno 13] Permission denied: '/var/crash/_usr_bin_5-a-day.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/5-a-day", line 39, in <module>
    sys.exit(main())
  File "/usr/bin/5-a-day", line 32, in main
    return bzr.add(args[1:])
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 81, in add
    update_team_file()
  File "/usr/lib/python2.5/site-packages/fiveaday/bzr.py", line 76, in update_team_file
    tof.add(files.get_lpid(), tf.teams)
  File "/usr/lib/python2.5/site-packages/fiveaday/files.py", line 74, in add
    f = open(tof_name, "a")
NameError: global name 'tof_name' is not defined

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Fixed problem by removing .5-a-day-team file. Doh.

Revision history for this message
Daniel Holbach (dholbach) wrote :

It would be interesting to know what you put in your .5-a-day-team file.

I just uploaded 0.38 which will fix the crash you uncovered. Thanks muchly for making 5-a-day more robust. It seems that a lot of stuff broke, when I broke out some code into a separate module and it wasn't discovered until now.

Thanks again.

Revision history for this message
Mike Basinger (mike.basinger) wrote :

My .5-a-day-team file

ubuntu-utah

Revision history for this message
Iain Lane (laney) wrote :

I was just seeing this crasher today. The same fix worked.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Did 0.38 fix it or was it removing the .5-a-day-team file? The latter would be rather a workaround. :-/

Revision history for this message
Iain Lane (laney) wrote :

Yes, sorry. Workaround is more appropriate. Anyway, the changes I made my branch which I linked to this bug have solved it properly for me at least, but it looks like LP is having problems scanning it ATM. I've attached a patch which you are free to use if you like.

Revision history for this message
Daniel Holbach (dholbach) wrote :

five-a-day (0.38) intrepid; urgency=low

  * fiveaday/bzr.py, fiveaday/files.py: apply patch by
    Iain Lane <email address hidden> to fix crasher (LP: #228329)

 -- Daniel Holbach <email address hidden> Mon, 26 May 2008 14:16:55 +0200

Changed in five-a-day:
status: New → 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.