I wasn't able to add widget from menu while starting it from command line worked fine. Adding Code: import gobject as first import directive at the beginning of the file seems (as someone mentioned in this thread before) to solve the problem.
import gobject