extra underscore at line 46 in gibareto.py

Bug #727154 reported by Charlie Heitzig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gibareto
Fix Released
Low
Miguel Ángel Molina

Bug Description

The usage function fails, at least on Windows 7 x64, with either 32-bit or 64-bit Python, unless you change line 46 to read:
  print ("""Gibareto usage: instead of print _("""Gibareto usage:

Related branches

Changed in gibareto:
status: New → Incomplete
importance: Undecided → Low
assignee: nobody → Miguel Ángel Molina (sslapp)
Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Thanks for the bug report.

In order to see what's happening I need the command line you run and the output you get.
I've no Win 7 so I can't reproduce the bug.

Which version of Gibareto are you running?

Regards.

Revision history for this message
Charlie Heitzig (mail-heitzig) wrote : Re: [Bug 727154] Re: extra underscore at line 46 in gibareto.py

Here's what I get when I run your current codebase (v0.30)

C:\Program Files (x86)\gibareto>gibareto.py -h
Traceback (most recent call last):
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 138, in <module>
    main()
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 93, in main
    usage()
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 46, in usage
    print _("""Gibareto usage:
NameError: global name '_' is not defined

C:\Program Files (x86)\gibareto>gibareto.py --help
Traceback (most recent call last):
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 138, in <module>
    main()
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 93, in main
    usage()
  File "C:\Program Files (x86)\gibareto\gibareto.py", line 46, in usage
    print _("""Gibareto usage:
NameError: global name '_' is not defined

If I change line 46 to read <print ("""Gibareto usage:>, (i.e. remove the
underscore before the open paren), it works fine

2011/3/1 Miguel Ángel Molina <email address hidden>

> Thanks for the bug report.
>
> In order to see what's happening I need the command line you run and the
> output you get.
> I've no Win 7 so I can't reproduce the bug.
>
> Which version of Gibareto are you running?
>
> Regards.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/727154
>
> Title:
> extra underscore at line 46 in gibareto.py
>
> Status in GMail Imap Backup Restore Tool (Gibareto):
> Incomplete
>
> Bug description:
> The usage function fails, at least on Windows 7 x64, with either 32-bit or
> 64-bit Python, unless you change line 46 to read:
> print ("""Gibareto usage: instead of print _("""Gibareto usage:
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/gibareto/+bug/727154/+subscribe
>

Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Hi, Charlie!

You're right. It was my fault. Sorry.
I call the usage function before define the _() translation function.

I had some problems to get the translations work at different platforms and, finally, I didn't realize of this bug.

I'm working to solve it.

Thanks and kind regards.

Changed in gibareto:
status: Incomplete → Confirmed
Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Version 0.3 updated

Changed in gibareto:
milestone: none → gibareto-0.3
status: Confirmed → Fix Committed
Changed in gibareto:
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.