captn3m0 / hackertray

:information_source: HackerTray is a minimalist Hacker News app for Linux

Home Page:https://github.com/captn3m0/hackertray

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Gtk.StatusIcon.set_from_file() argument 1 must be string, not None

daGrevis opened this issue · comments

 ~ % hackertray 
Traceback (most recent call last):
  File "/usr/bin/hackertray", line 9, in <module>
    load_entry_point('hackertray==1.5', 'console_scripts', 'hackertray')()
  File "/usr/lib/python2.7/site-packages/hackertray/__init__.py", line 123, in main
    indicator = HackerNewsApp()
  File "/usr/lib/python2.7/site-packages/hackertray/__init__.py", line 31, in __init__
    self.ind = appindicator.Indicator ("Hacker Tray", "hacker-tray", appindicator.CATEGORY_APPLICATION_STATUS)
  File "/usr/lib/python2.7/site-packages/hackertray/appindicator_replacement.py", line 62, in __init__
    self.icon.set_from_file(self.inactive_icon)
TypeError: Gtk.StatusIcon.set_from_file() argument 1 must be string, not None

Arch Linux and xmonad.

same issue on debian 7, gnome 3, python 2.7.5+

Same on Ubuntu 13.10, Python 2.7.5+

same on opensuse 13.1

It seems cause by the losing icon.

cd /usr/share/pixmaps
wget https://raw.github.com/captn3m0/hackertray/master/images/hacker-tray.png

It works well. But it should have a patch for this environment dependency path issues.

ps. update you requests version for the TypeError: 'list' object is not callable issues

commented

The setup.py file forces the image to be packaged, so I'm not sure why it is missing.

package_data={'hackertray': ['../images/hacker-tray.png']},

Same on Fedora 19.

Run wget https://raw.github.com/captn3m0/hackertray/master/images/hacker-tray.png as mentioned by @ltaoist in either of these directories:

   '/usr/bin/images'
   '/usr/lib/python2.7/site-packages/hackertray-1.5-py2.7.egg/hackertray/images
   '/usr/lib/python2.7/site-packages/hackertray-1.5-py2.7.egg/images
   '/usr/share/pixmaps'

Also, I used easy_install, could it be that it works with pip but not easy_install?

commented

While I get onto this bug, could you please review my initial idea for comment links in the app. Just click #12

As for fedora 19, does not work either using pip per the question above.

Same issue for Gentoo, Python 2.7.5+

Same here. OpenSUSE 13.1 + Mate + Xmonad.

commented

An alternative would be to install the libappindicator package. Its available for Arch, Fedora(?), and other distros. You can also try the AppIndicator Support Extension available for Gnome Shell users.

img light icon with transparent background if anyone needs this.

@Gonzih That looks heaps better on i3bar. @captn3m0 Perhaps you should package the transparent icon too?

commented

I've pushed to 1.7 with a fix for this. Please let me know if it doesn't work. Upgrade instructions are in the README.

Works fine for me, thank you!

On Fri, 2013-11-29 at 22:15 -0800, Abhay Rana (Nemo) wrote:

I've pushed to 1.7 with a fix for this. Please let me know if it
doesn't work.


Reply to this email directly or view it on GitHub.

Regards,
Max

I'm still getting the same error after upgrading, reinstalling, and removing pip's temp files as described in the readme. I'm running Ubuntu 13.10 and hackertray 1.7.

Oh, and I installed via pip sometime less than an hour ago.

commented

@slang800 A workaround is to download the source, and run sudo python setup.py install manually. I'm still investigating why pip is missing the images folder while installing.

I use easy_install on opensuse, works fine.

On Sat, 2013-11-30 at 01:05 -0800, Abhay Rana (Nemo) wrote:

@slang800 A workaround is to download the source, and run sudo python
setup.py install manually. I'm still investigating why pip is missing
the images folder while installing.


Reply to this email directly or view it on GitHub.

Regards,
Max

commented

Yeah. Just tried easy_install. The issue seems to be with pip. pip is installing the image to /usr/local/images/ for some reason.

Thanks! Using easy_install fixed the starting issue, however, when I run hackertray nothing shows up in the tray... it just lists off urls:

$ hackertray
http://node-hnapi-asia.azurewebsites.net/
http://node-hnapi-wus.azurewebsites.net/
http://node-hnapi-eus.azurewebsites.net/
http://node-hnapi-asia.azurewebsites.net/
http://node-hnapi-asia.azurewebsites.net/
http://node-hnapi-asia.azurewebsites.net/
http://node-hnapi.azurewebsites.net/
http://node-hnapi-wus.azurewebsites.net/
http://node-hnapi-weu.azurewebsites.net/
http://node-hnapi-weu.azurewebsites.net/
http://node-hnapi-eu.herokuapp.com/
http://node-hnapi.azurewebsites.net/
http://node-hnapi-weu.azurewebsites.net/
http://node-hnapi-asia.azurewebsites.net/
http://node-hnapi-eus.azurewebsites.net/
http://node-hnapi-wus.azurewebsites.net/
http://node-hnapi.azurewebsites.net/
http://node-hnapi-wus.azurewebsites.net/
http://node-hnapi-ncus.azurewebsites.net/
http://node-hnapi-wus.azurewebsites.net/
http://node-hnapi-eus.azurewebsites.net/

Am I doing something wrong?

commented

@slang800 As long as each url is separated by 5 minutes, its fine. I thought printing the url when hackertray refreshes would be a nice thing to have. Might remove in next version.

Yeah, the urls aren't the issue - it's the fact that nothing appears in the tray