2011-11-03, 03:45
did you call the file htpcfrontend.conf with the .conf extention? try calling the file just htpcfrontend
xbmc@XBMCLive:~$ a2ensite htpcfrontend
Enabling site htpcfrontend.
Could not create /etc/apache2/sites-enabled/htpcfrontend: Permission denied
xbmc@XBMCLive:~$ sudo a2ensite htpcfrontend
[sudo] password for xbmc:
Enabling site htpcfrontend.
Run '/etc/init.d/apache2 reload' to activate new configuration!
xbmc@XBMCLive:~$ /etc/init.d/apache2 reload
* Reloading web server config apache2 httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[fail]
xbmc@XBMCLive:~$ sudo /etc/init.d/apache2 reload
* Reloading web server config apache2 [ OK ]
xbmc@XBMCLive:~$
[Thu Nov 03 02:31:20 2011] [notice] Graceful restart requested, doing restart
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:21 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.10 with Suhosin-Patch mod_wsgi/2.8 Python/2.6.5 configured -- resuming normal operations
DejaVu Wrote:EDIT -
I reset my Apache log just before the reload and found this. Don't know if it will help though.
Code:[Thu Nov 03 02:31:20 2011] [notice] Graceful restart requested, doing restart
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:21 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.10 with Suhosin-Patch mod_wsgi/2.8 Python/2.6.5 configured -- resuming normal operations
percula Wrote:Did a bit of Google-fu... the KeyError thing is a known bug that was patched over a year ago. But I dont think Ubuntu heard about it as the version of mod_wsgi that installed on 10.04 is 2.8-2 with the current version being 3.3
I will venture to say all of the people (myself included) that are just getting the directory listing are on some flavor of Ubuntu with mod_wsgi version less than 3.3
I will leave the find of the right package to someone else...
Dougedey Wrote:Ubuntu 11.10 comes with 3.3.
You can get the 3.3 packages from here: http://packages.debian.org/unstable/pyth...2-mod-wsgi
sudo easy_install gunicorn
cd /your/maraschino/directory/
gunicorn -b yourip:yourport -w 4 htpcfrontend:app
gunicorn -b yourip:yourport -w 4 htpcfrontend:app -D
cd /your/maraschino/directory/
python htpcfrontend.py
if __name__ == '__main__':
app.run(debug=True,port=5001,host='0.0.0.0')
UndisclosedP Wrote:So hacked around with flask, which i've never used before and it seems it does have its own built in web server. I'm not sure why mrkipling doesnt suggest using it. Perhaps you can enlighten us. But another way to get the app to 'just run' is
Code:cd /your/maraschino/directory/
python htpcfrontend.py
This will start the flask debug server on port 127.0.0.1:5000 and it seems to work perfectly! You can hack htpcfrontend.py to run a different port and ip like so at the end of the file.
Code:if __name__ == '__main__':
app.run(debug=True,port=5001,host='0.0.0.0')
DejaVu Wrote:Could I make a coulpe of suggestions/requests...
hard drive capacity widget and frontend settings editing.
xbmc@XBMCLive:~$ sudo python /var/www/htpc-frontend/htpcfrontend.py
Traceback (most recent call last):
File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
from settings import *
File "/var/www/htpc-frontend/settings.py", line 30
TRAKT_API_KEY = thisismytraktvapikey
Traceback (most recent call last):
File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
from settings import *
File "/var/www/htpc-frontend/settings.py", line 30
TRAKT_API_KEY = thisismytraktvapikey
^
SyntaxError: invalid syntax
DejaVu Wrote:Ran it manually from inside Putty to have a nose and I must say, it looks even better in the flesh!
I reckon this is the way to go - forget *apache and just run it using Python within a deamon and an init.d script with its own unique port?
Thanks UndisclosedP.
DejaVu Wrote:Changing None next to Trakt_API_Key to my API Key is throwing an error. Tried with ('apikey'), without (apikey) and with ("apikey"). Also tried with commas - but keep getting...
What is the correct syntax for this?Code:xbmc@XBMCLive:~$ sudo python /var/www/htpc-frontend/htpcfrontend.py
Traceback (most recent call last):
File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
from settings import *
File "/var/www/htpc-frontend/settings.py", line 30
TRAKT_API_KEY = thisismytraktvapikey
Traceback (most recent call last):
File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
from settings import *
File "/var/www/htpc-frontend/settings.py", line 30
TRAKT_API_KEY = thisismytraktvapikey
^
SyntaxError: invalid syntax
TRAKT_API_KEY = 'whateveryourapikeyis'
cd /your/maraschino/directory/
python htpcfrontend.py
HarryRosen Wrote:try sudo python htpcfrontend.py
that worked for me
HarryRosen Wrote:on a side note, everything is running now, but the thumbnails are not working for the episodes. ... my thumbnails are stores on my server since i have a centralized database if that matters.
HarryRosen Wrote:and trak.tv doesn't show up.