Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.38k stars 576 forks source link

AttributeError: 'NoneType' object has no attribute 'startswith' #683

Closed Queuecumber closed 8 years ago

Queuecumber commented 8 years ago

Just installed the lastest Guake from the master branch, gives the following error when opening guake-prefs

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/guake/prefs.py", line 1135, in <module>
    setup_standalone_signals(PrefsDialog()).show()
  File "/usr/local/lib/python2.7/dist-packages/guake/prefs.py", line 493, in __init__
    self.load_configs()
  File "/usr/local/lib/python2.7/dist-packages/guake/prefs.py", line 924, in load_configs
    value = os.path.expanduser(self.client.get_string(KEY('/general/custom_command_file')))
  File "/usr/lib/python2.7/posixpath.py", line 254, in expanduser
    if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Any idea what I'm doing wrong?

pypingou commented 8 years ago

Are you sure you pulled from master? https://github.com/Guake/guake/blob/master/src/guake/prefs.py#L924

Queuecumber commented 8 years ago

Yeah it looks like master

Just to be sure I did a make uninstall and a make clean then pulled fresh and ran dev.sh which hung with the following output

INFO:guake.guake_app:Logging configuration complete
/home/mehrlich/Code/guake/src/guake/guake_app.py:1785: GtkWarning: gtk_box_pack: assertion     'child->parent == NULL' failed
  self.mainframe.pack_start(self.notebook, expand=True, fill=True, padding=0)
INFO:__main__:--no-startup-script argument defined, so don't execute the startup script

I also tried dev-gtk3.sh which failed with error

src-gtk3/guake/gtk3test.py:29: PyGIWarning: Gtk was imported without specifying a version first. Use    gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
src-gtk3/guake/gtk3test.py:30: PyGIWarning: Vte was imported without specifying a version first. Use  gi.require_version('Vte', '2.91') before import to ensure that the right version gets loaded.
  from gi.repository import Vte
/home/mehrlich/Code/guake/src-gtk3/guake/terminal.py:26: PyGIWarning: GdkX11 was imported without specifying a version first. Use gi.require_version('GdkX11', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkX11
Traceback (most recent call last):
  File "src-gtk3/guake/gtk3test.py", line 34, in <module>
    from guake.terminal import Terminal
  File "/home/mehrlich/Code/guake/src-gtk3/guake/terminal.py", line 31, in <module>
    from guake.common import clamp
  File "/home/mehrlich/Code/guake/src-gtk3/guake/common.py", line 31, in <module>
    import guake.globals
ImportError: No module named 'guake.globals'

So then I tried ./autogen.sh, ./configure, make, sudo make install which completely sucessfully and seems to have resolved the error I reported above with guake-prefs.

Would be nice if I could run the gtk3 build though, is the error I am getting a known bug or is it something bad on my end?

gsemet commented 8 years ago

forget about gtk3, it's still under development.

Fixed in head (800bc27ab463a7252b27ea0e5e46a9b41ddc9254)