TypeError when creating a new file

Bug #608053 reported by Jon Black
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prioritise
Fix Committed
Critical
Unassigned

Bug Description

When creating a new file, and entering the filename, the following TypeError is raised:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py", line 301, in on_file_new_action_activate
    self._task_list_storage = TaskListFileStorage(filename, True)
TypeError: __init__() takes exactly 2 arguments (3 given)

Tags: 0.1.0 ui
Jon Black (juan-black)
Changed in prioritise:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → 0.1.1
Revision history for this message
Rafael Pinheiro (moriarty.pinheiro) wrote :

I did a quick fix on the TaskListFileStorage class inside the tasks.py file.

Revision history for this message
Jon Black (juan-black) wrote : Re: [Bug 608053] Re: TypeError when creating a new file

Thanks, that's great!

I'll merge it when I figure out how to do that. If not I can just copy
and paste :)

Jon

On Wed, 28 Jul 2010 11:56 +0000, "Rafael Pinheiro"
<email address hidden> wrote:
> I did a quick fix on the TaskListFileStorage class inside the tasks.py
> file.
>
> ** Attachment added: "tasks.py"
> http://launchpadlibrarian.net/52633503/tasks.py
>
> --
> TypeError when creating a new file
> https://bugs.launchpad.net/bugs/608053
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Prioritise: Confirmed
>
> Bug description:
> When creating a new file, and entering the filename, the following
> TypeError is raised:
>
> Traceback (most recent call last):
> File
> "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py",
> line 301, in on_file_new_action_activate
> self._task_list_storage = TaskListFileStorage(filename, True)
> TypeError: __init__() takes exactly 2 arguments (3 given)
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/prioritise/+bug/608053/+subscribe
>

Revision history for this message
Rafael Pinheiro (moriarty.pinheiro) wrote :
  • tasks.diff Edit (313 bytes, text/x-patch; charset=US-ASCII; name="tasks.diff")

I think that to merge you'll need a diff file to apply it as a patch.
Not sure how to do that too :P

Diff file attached anyway.

2010/7/28 Jon Black <email address hidden>

> Thanks, that's great!
>
> I'll merge it when I figure out how to do that. If not I can just copy
> and paste :)
>
> Jon
>
> On Wed, 28 Jul 2010 11:56 +0000, "Rafael Pinheiro"
> <email address hidden> wrote:
> > I did a quick fix on the TaskListFileStorage class inside the tasks.py
> > file.
> >
> > ** Attachment added: "tasks.py"
> > http://launchpadlibrarian.net/52633503/tasks.py
> >
> > --
> > TypeError when creating a new file
> > https://bugs.launchpad.net/bugs/608053
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
> > Status in Prioritise: Confirmed
> >
> > Bug description:
> > When creating a new file, and entering the filename, the following
> > TypeError is raised:
> >
> > Traceback (most recent call last):
> > File
> > "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py",
> > line 301, in on_file_new_action_activate
> > self._task_list_storage = TaskListFileStorage(filename, True)
> > TypeError: __init__() takes exactly 2 arguments (3 given)
> >
> > To unsubscribe from this bug, go to:
> > https://bugs.launchpad.net/prioritise/+bug/608053/+subscribe
> >
>
> --
> TypeError when creating a new file
> https://bugs.launchpad.net/bugs/608053
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Prioritise: Confirmed
>
> Bug description:
> When creating a new file, and entering the filename, the following
> TypeError is raised:
>
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py",
> line 301, in on_file_new_action_activate
> self._task_list_storage = TaskListFileStorage(filename, True)
> TypeError: __init__() takes exactly 2 arguments (3 given)
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/prioritise/+bug/608053/+subscribe
>

--
►Rafael Pinheiro
►Email: <email address hidden>
►Email: <email address hidden>
►MSN: <email address hidden>
►Blog: http://rbpinheiro.wordpress.com/

Revision history for this message
Jon Black (juan-black) wrote :
Download full text (3.5 KiB)

I applied the patch, but made a slight change as the unit tests were
failing:

if not os.path.exists(filename) and not new:
    raise ValueError("%s does not exist: " % (filename))

    if new:
        f = open(filename, "w")
        f.close()

Thanks for your help. The fix is now in trunk.

status fixcommitted

On Wed, 28 Jul 2010 17:02 +0000, "Rafael Pinheiro"
<email address hidden> wrote:
> I think that to merge you'll need a diff file to apply it as a patch.
> Not sure how to do that too :P
>
> Diff file attached anyway.
>
> 2010/7/28 Jon Black <email address hidden>
>
> > Thanks, that's great!
> >
> > I'll merge it when I figure out how to do that. If not I can just copy
> > and paste :)
> >
> > Jon
> >
> > On Wed, 28 Jul 2010 11:56 +0000, "Rafael Pinheiro"
> > <email address hidden> wrote:
> > > I did a quick fix on the TaskListFileStorage class inside the tasks.py
> > > file.
> > >
> > > ** Attachment added: "tasks.py"
> > > http://launchpadlibrarian.net/52633503/tasks.py
> > >
> > > --
> > > TypeError when creating a new file
> > > https://bugs.launchpad.net/bugs/608053
> > > You received this bug notification because you are a direct subscriber
> > > of the bug.
> > >
> > > Status in Prioritise: Confirmed
> > >
> > > Bug description:
> > > When creating a new file, and entering the filename, the following
> > > TypeError is raised:
> > >
> > > Traceback (most recent call last):
> > > File
> > > "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py",
> > > line 301, in on_file_new_action_activate
> > > self._task_list_storage = TaskListFileStorage(filename, True)
> > > TypeError: __init__() takes exactly 2 arguments (3 given)
> > >
> > > To unsubscribe from this bug, go to:
> > > https://bugs.launchpad.net/prioritise/+bug/608053/+subscribe
> > >
> >
> > --
> > TypeError when creating a new file
> > https://bugs.launchpad.net/bugs/608053
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
> > Status in Prioritise: Confirmed
> >
> > Bug description:
> > When creating a new file, and entering the filename, the following
> > TypeError is raised:
> >
> > Traceback (most recent call last):
> > File "/usr/local/lib/python2.6/dist-packages/prioritise/ui/gtk/tasks.py",
> > line 301, in on_file_new_action_activate
> > self._task_list_storage = TaskListFileStorage(filename, True)
> > TypeError: __init__() takes exactly 2 arguments (3 given)
> >
> > To unsubscribe from this bug, go to:
> > https://bugs.launchpad.net/prioritise/+bug/608053/+subscribe
> >
>
>
> --
> ►Rafael Pinheiro
> ►Email: <email address hidden>
> ►Email: <email address hidden>
> ►MSN: <email address hidden>
> ►Blog: http://rbpinheiro.wordpress.com/
>
>
> ** Patch added: "tasks.diff"
> http://launchpadlibrarian.net/52645993/tasks.diff
>
> --
> TypeError when creating a new file
> https://bugs.launchpad.net/bugs/608053
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Prioritise: Confirmed
>
> Bug description:
> When creating a new file, and entering the filename, the following
> TypeError is raised:
>
> Tracebac...

Read more...

Changed in prioritise:
status: Confirmed → Fix Committed
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.