Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm trying to package an app to /opt, but when installed the app won't run and complains:

Traceback (most recent call last):
 File "/opt/", line 45, in <module>
    import drawers
  File "/opt/", line 21, in <module>
    locale.bindtextdomain('drawers', '/opt/')
NameError: name 'locale' is not defined

I can't figure out what I need to change. Is there a config file I need to alter?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It seems to me that your application doesn't contain any internationalized strings (internationalized with gettext helper: _(). So no local is produced to the targeted system as there is nothing to translate!

See for my information on gettext frmo python.

If your application doesn't contain any strings that you present to the user, you can remove the locale.bindtextdomain command in drawers/

share|improve this answer
Thanks for your help... There actually isn't locale.bindtext command in the quickly template. Just deleting these lines from worked: import gettext from gettext import gettext as _ gettext.textdomain('drawers') Note that commenting them out isn't good enough, they get replaced with the actual locale command text when packaged via quickly package --extras (not regular package). –  Ian B. Jul 9 '12 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.