hamster-gtk
hamster-gtk copied to clipboard
Doesn't run with latest hamster-lib (0.13.0)
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'
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://github.com/projecthamster/hamster-gtk.git
mkvirtualenv hamster-gtk
workon hamster-gtk
toggleglobalsitepackages
pip install hamster-gtk
hamster-gtk
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.
@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.