Cola fails to start in Ubuntu #131

Closed
LaurentGoderre opened this Issue May 29, 2012 · 7 comments

Comments

Projects
None yet
2 participants

This is probably not a bug and probably something I did on my system but when I run cola in Ubuntu nothing shows. When I run it in the Terminal here is the error output

Traceback (most recent call last):
File "/usr/bin/cola", line 54, in
cola.main.main()
File "/usr/share/git-cola/lib/cola/main.py", line 159, in main
startup_dlg = startup.StartupDialog(app.activeWindow())
File "/usr/share/git-cola/lib/cola/views/startup.py", line 35, in init
self.model = settings.SettingsManager.settings()
File "/usr/share/git-cola/lib/cola/settings.py", line 43, in settings
SettingsManager._settings = serializer.load(_rcfile)
File "/usr/share/git-cola/lib/cola/serializer.py", line 16, in load
return decode(utils.slurp(path))
File "/usr/share/git-cola/lib/cola/serializer.py", line 35, in decode
obj = jsonpickle.decode(jsonstr)
File "/usr/share/git-cola/lib/jsonpickle/init.py", line 311, in decode
return j.restore(json.decode(string))
File "/usr/share/git-cola/lib/jsonpickle/init.py", line 210, in decode
raise e
ValueError: No JSON object could be decoded

Owner

davvid commented May 29, 2012

I think cola no longer uses jsonpickle. Can you please try it with the latest master.

Another curiousity -- it seems that cola is choking on reading your ~/.colarc file. Do you have one? What are its contents? Is it valid JSON? It might be at ~/.config/git-cola/settings ... I'm not sure. The path changed at one point.

I do not have a ~/.colarc I have a ~/.cola. I also don't have a ~/.config/git-cola/

The build fails with this error:

python setup.py build
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    from setuptools import setup
ImportError: No module named setuptools
make: *** [all] Error 1

And running it directly gives the following:

Traceback (most recent call last):
  File "/usr/bin/git-cola", line 54, in <module>
    cola.main.main()
  File "/usr/share/git-cola/lib/cola/main.py", line 172, in main
    view = MainView()
  File "/usr/share/git-cola/lib/cola/views/main.py", line 193, in __init__
    self._load_gui_state()
  File "/usr/share/git-cola/lib/cola/views/main.py", line 340, in _load_gui_state
    state = settings.SettingsManager.gui_state(self)
  File "/usr/share/git-cola/lib/cola/settings.py", line 60, in gui_state
    return SettingsManager.settings().gui_state.get(gui.name(), {})
  File "/usr/share/git-cola/lib/cola/settings.py", line 43, in settings
    SettingsManager._settings = serializer.load(_rcfile)
  File "/usr/share/git-cola/lib/cola/serializer.py", line 16, in load
    return decode(utils.slurp(path))
  File "/usr/share/git-cola/lib/cola/serializer.py", line 35, in decode
    obj = jsonpickle.decode(jsonstr)
  File "/usr/share/git-cola/lib/jsonpickle/__init__.py", line 311, in decode
    return j.restore(json.decode(string))
  File "/usr/share/git-cola/lib/jsonpickle/__init__.py", line 210, in decode
    raise e
ValueError: No JSON object could be decoded
Owner

davvid commented May 29, 2012

Sorry, yes, the contents of ~/.cola would be helpful for me. Aside from debugging, if you move that file out of the way then it should start working again.

I had a feeling that the distutils vs. setuptools change could be harmful. I don't like forcing people to get new dependencies (setuptools in this case).

I'm going to revert the commit where we started using setuptools. We don't need it.

davvid added a commit that referenced this issue May 29, 2012

setup.py: Eliminate `setuptools` dependency
Not everyone has setuptools and we do not want to force people to
install dependencies that we do not strictly need.

Go back to using distutils.

Related-to: #131
Noticed-by: Laurent Goderre <laurent.goderre@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Owner

davvid commented May 29, 2012

I updated cola to no longer require setuptools. If you're in a pinch then you should be able to clone it anywhere and then simply add the repo's bin/ directory somewhere in your path and things should work. You don't actually need to build it (it can run fine in-place).

I don't know why but is actually empty.

Regardless your update resolved the issue. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment