Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't run with latest hamster-lib (0.13.0) #182

Open
dflock opened this issue Jun 7, 2017 · 3 comments · Fixed by #183
Open

Doesn't run with latest hamster-lib (0.13.0) #182

dflock opened this issue Jun 7, 2017 · 3 comments · Fixed by #183
Assignees
Labels

Comments

@dflock
Copy link

dflock commented Jun 7, 2017

If you update to latest hamster-lib - by running pip install -U hamster-gtk, then hamster-gtk will fail to start:

$ pip install -U hamster-gtk

Requirement already up-to-date: hamster-gtk in ./venv/hamster-gtk/lib/python2.7/site-packages
Collecting hamster-lib (from hamster-gtk)
  Downloading hamster_lib-0.13.0-py2.py3-none-any.whl (80kB)
    100% |████████████████████████████████| 81kB 2.8MB/s 
Requirement already up-to-date: icalendar in ./venv/hamster-gtk/lib/python2.7/site-packages (from hamster-lib->hamster-gtk)
Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from hamster-lib->hamster-gtk)
Requirement already up-to-date: future in /usr/local/lib/python2.7/dist-packages (from hamster-lib->hamster-gtk)
Requirement already up-to-date: configparser>=3.5.0b2 in /usr/local/lib/python2.7/dist-packages (from hamster-lib->hamster-gtk)
Requirement already up-to-date: sqlalchemy in /usr/local/lib/python2.7/dist-packages (from hamster-lib->hamster-gtk)
Requirement already up-to-date: appdirs in /usr/local/lib/python2.7/dist-packages (from hamster-lib->hamster-gtk)
Collecting pytz (from icalendar->hamster-lib->hamster-gtk)
  Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 2.1MB/s 
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/dist-packages (from icalendar->hamster-lib->hamster-gtk)
Installing collected packages: hamster-lib, pytz
  Found existing installation: hamster-lib 0.12.0
    Uninstalling hamster-lib-0.12.0:
      Successfully uninstalled hamster-lib-0.12.0
  Found existing installation: pytz 2014.9
    Not uninstalling pytz at /usr/local/lib/python2.7/dist-packages, outside environment /home/duncan/venv/hamster-gtk
Successfully installed hamster-lib-0.13.0 pytz-2017.2

$ hamster-gtk
Traceback (most recent call last):
  File "/home/duncan/venv/hamster-gtk/bin/hamster-gtk", line 11, in <module>
    sys.exit(_main())
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_gtk/hamster_gtk.py", line 389, in _main
    app = HamsterGTK()
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_gtk/hamster_gtk.py", line 181, in __init__
    self._config = self._reload_config()
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_gtk/hamster_gtk.py", line 238, in _reload_config
    config = self._get_config_from_file()
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_gtk/hamster_gtk.py", line 383, in _get_config_from_file
    cp_instance = get_config_instance(get_fallback(), 'hamster-gtk', 'hamster-gtk.conf')
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_gtk/helpers.py", line 127, in get_config_instance
    path = config_helpers.get_config_path(app_name, file_name)
  File "/home/duncan/venv/hamster-gtk/local/lib/python2.7/site-packages/hamster_lib/helpers/config_helpers.py", line 155, in get_config_path
    return os.path.join(appdirs.user_config_dir, file_name)
AttributeError: 'unicode' object has no attribute 'user_config_dir'
jtojnar added a commit that referenced this issue Jun 7, 2017
hamster-lib 0.13.0 changes the interface of the configuration helpers
in a backwards incompatible way. Additionally, the configuration files
are expected to be called projecthamster to facilitate sharing
of configuration accross clients.

This patch uses the new interface, relying on default values provided
by the library. Now unnecessary helper was also removed.

Closes: #182
elbenfreund pushed a commit that referenced this issue Jun 19, 2017
``hamster-lib 0.13.0`` changes the interface of the configuration helpers
in a backwards incompatible way. The now unnecessary helper was also removed.

Closes: #182
@alessanderbotti
Copy link

I still get this error on Ubuntu 18.04 and installing hamster-gtk by the following commands:

sudo apt install xvfb virtualenvwrapper python3-gi python-gi gir1.2-gtk-3.0 libglib2.0-dev libgtk-3-dev
echo 'source /usr/share/virtualenvwrapper/virtualenvwrapper.sh' >> ~/.profile
source ~/.profile
git clone https:/projecthamster/hamster-gtk.git
mkvirtualenv hamster-gtk
workon hamster-gtk
toggleglobalsitepackages
pip install hamster-gtk
hamster-gtk

@elbenfreund elbenfreund reopened this Nov 21, 2018
@elbenfreund
Copy link
Collaborator

I can confirm this behaviour. Reopening the issue. Will try to deal with this in the next week or two. Sorry I can't commit more right now.

@elbenfreund elbenfreund self-assigned this Nov 21, 2018
@shaform
Copy link

shaform commented Dec 17, 2018

@alessanderbotti It appears the only reason it fails is because the PyPI package is not updated. If you use the code in develop branch. It is runnable.

Grandmother pushed a commit to Grandmother/hamster-gtk that referenced this issue Jan 12, 2019
``hamster-lib 0.13.0`` changes the interface of the configuration helpers
in a backwards incompatible way. The now unnecessary helper was also removed.

Closes: projecthamster#182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants