jayme-github / steam_idle

Idle Steam apps/games for card drops
GNU General Public License v2.0
14 stars 1 forks source link

Can't run GUI version with Python 2 #10

Closed kopr12 closed 8 years ago

kopr12 commented 8 years ago

cli works fine btw

Having problems running GUI version, first error was : 'ImportError: No module named setproctitle' After installing it with pip new error popped and I can't solved that one, this is what I get :

2016-02-23 00:01:19,799 (__main__.<module>) [DEBUG] Creating MainWindow
Traceback (most recent call last):
  File "steam_idle_gui.py", line 20, in <module>
    ui = MainWindow()
  File "/home/kajzer/Steam-Idle/steam_idle_qt/ui/mainwindow.py", line 46, in __init__
    super().__init__(parent)
TypeError: super() takes at least 1 argument (0 given)
Chematronix commented 8 years ago

You're probably trying to run the GUI with Python 2. Seems it only works with 3. Python stuff is a mess right now, you gotta double check that everything you need works with the right version, and use the right commands (python3 - pip3 for Python 3).

This is what worked for me in a vanilla Kubuntu just now:

# Dependencies (BeautifulSoup has to be v4 to work with Python 3):
sudo pip3 install BeautifulSoup4 steamweb setproctitle
# I already had python-qt4 but doesn't hurts:
sudo apt-get install python-qt4 
steam &
python3 steam_idle_gui.py &

Cheers.

kopr12 commented 8 years ago

It was a problem on my end, it works now, thanks !

jayme-github commented 8 years ago

@Chematronix you'r right. GUI code (from the ui files) is python3 only atm. Maybe this helps a little to keep things seperated: https://gist.github.com/jayme-github/3f1ac868b8e447567dfe

Problem is that PyQT4 API is has some incompatibilities too. Will have to add some version specific code for this to work.

jayme-github commented 8 years ago

Was a little easier as expected :smiley:

Chematronix commented 8 years ago

Super! ^H^H^H I mean, super(CongratulateYour, self). ;)

kopr12 commented 8 years ago

Yeah, sorry for all the confusion and opening this 'issue' , should have checked that before I posted. Thing is, I'm on Gentoo and the active python interpreter was python 3.5, problem was that I compiled PyQt4 with python 2.7 and 3.4 use flags, so after changing active interpreter to 3.4 all was well. "python3.4 steam_idle_gui.py" would have worked too.