Kodi Community Forum
Maraschino (formerly HTPC Frontend) - a summary web interface for your XBMC HTPC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Maraschino (formerly HTPC Frontend) - a summary web interface for your XBMC HTPC (/showthread.php?tid=113136)



- Archigos - 2011-11-14

Shaolin Wrote:I use MYSQL to share my library around the house with username 'xbmc' and password 'xbmc' on port 3306 as outlined in the MYSQL tutorial on these forums. I have tried keeping AUTH commented and also tried tried putting:

Code:
AUTH = {
    'username': 'xbmc',
    'password': 'xbmc'
}

in settings.py but I still get the same sockets error.
I don't use MySQL to share DB's, but the AUTH in settings.py is for your XBMC Web Interface (which you may have different then the MySQL user/pass). If you don't have a user/pass for the web interface, set one using xbmc for both and you should be set for this part.

Quote:here is my settings.py:

Code:
# this is where you database is going to be stored
# make sure that you have write access to the directory

DATABASE = 'c:/maraschino.db'

# if serving using CherryPy (maraschino-cherrypy.py)
# you can set the port here

CHERRYPY_PORT = 7000

# include AUTH if you want to use HTTP basic authentication
# if serving using Apache and mod_wsgi, make sure to enable auth forwarding:
# http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization

AUTH = {
    'username': 'xbmc',
    'password': 'xbmc'
}

# if you are using the dev server and want to run Maraschino on a different port
# then enable this setting

PORT = 5000
Do NOT use "c:" in your database name, if you want it on the root of the drive, use "/maraschino.db" or if you want it in the Maraschino directory, use "/pathtomaraschino/maraschino.db" make sure there aren't spaces in the path name.


Quote:This opens up a command window which hangs at:

Code:
* Running on http://0.0.0.0:5000/
* Restarting with reloader

Killed it and tried the cherrypy again with the same sockets error.

Thanks for the assistance on this.

Much appreciated.

Shaolin

That actually didn't hang, when you run maraschino (non-cherrypy) it will appear that way and still be running in the background (at least it did for me).

Overall, check the XBMC web interface User/Pass, change the database location as I stated above and run "Python setup.py" from your Maraschino directory, if/when it says that database was initiated, trying running "start python maraschino-cherrypy.py" again and let me know what happens.


- Rumik - 2011-11-14

Thanks, a reboot seemed to sort it out.

Nearly there now...

I'm trying to run the following, and getting the following error:

C:\Users\Ryan\Downloads\maraschino>python setup.py
You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.


I didn't get any errors when installing SQLAlchemy...


C:\Python27\Scripts>easy_install Flask-SQLAlchemy
Searching for Flask-SQLAlchemy
Best match: flask-sqlalchemy 0.15
Processing flask_sqlalchemy-0.15-py2.7.egg
flask-sqlalchemy 0.15 is already the active version in easy-install.pth

Using c:\python27\lib\site-packages\flask_sqlalchemy-0.15-py2.7.egg
Processing dependencies for Flask-SQLAlchemy
Finished processing dependencies for Flask-SQLAlchemy



And here's my settings.py

# this is where you database is going to be stored
# make sure that you have write access to the

directory

DATABASE = '/pathtomaraschino/maraschino.db'

# if serving using CherryPy (maraschino-

cherrypy.py)
# you can set the port here

CHERRYPY_PORT = 7000

# include AUTH if you want to use HTTP

basic authentication
# if serving using Apache and mod_wsgi, make sure to enable auth forwarding:
#

http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization

#AUTH = {
#

'username': 'username',
# 'password': 'password'
#}

# if you are using the dev server and want to run

Maraschino on a different port
# then enable this setting

#PORT = 5000


Any more advice?

Thanks Big Grin


- HarryRosen - 2011-11-14

I run mysql on my unraid server and have no problems

my settings.py is fairly simple

I just has the changes for the db

DATABASE = '/home/xbmc/.marachino/maraschino.db'

no problems here with mysql part it should stop the program from loading


- Shaolin - 2011-11-14

OK, I changed the DATABASE path to:

Code:
'/maraschino.db'

entered the user/pass of xbmc/xbmc in XBMC web interface. Ran setup.py and got:

Code:
Database successfully initialised

then tried "start python maraschino-cherry.py" again and i get another window pop up for a nanosecond then disappear. Do i have to now open up a browser at a certain IPTongueort location? NOthing happens after the second window pops up VERY briefly.

Thanks


- Archigos - 2011-11-14

Rumik Wrote:Thanks, a reboot seemed to sort it out.

Nearly there now...

I'm trying to run the following, and getting the following error:

C:\Users\Ryan\Downloads\maraschino>python setup.py
You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.
Ok, I'm assuming your trying to run Maraschino out of "C:\Users\Ryan\Downloads\maraschino" correct? If that's the case, see my comment below.

Quote:And here's my settings.py

# this is where you database is going to be stored
# make sure that you have write access to the

directory

DATABASE = '/pathtomaraschino/maraschino.db'

# if serving using CherryPy (maraschino-

cherrypy.py)
# you can set the port here

CHERRYPY_PORT = 7000

# include AUTH if you want to use HTTP

basic authentication
# if serving using Apache and mod_wsgi, make sure to enable auth forwarding:
#

http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization

#AUTH = {
#

'username': 'username',
# 'password': 'password'
#}

# if you are using the dev server and want to run

Maraschino on a different port
# then enable this setting

#PORT = 5000

Use the below for your settings.py:
Code:
DATABASE = '/Users/Ryan/Downloads/maraschino/maraschino.db'

CHERRYPY_PORT = 7000

AUTH = {
  'username': 'XXX',
  'password': 'YYY'
}

PORT = 5000
Just change XXX and YYY to match the username and password you have from XBMC's Network settings. If you don't have a user/pass for the Web Interface, just put a # at the beginning of the 4 lines (AUTH, 'username', 'password', and })

Once you've changed your settings.py to match this, run "Python setup.py" once more and it should fix your database so that you can run properly.


- Archigos - 2011-11-14

Shaolin Wrote:OK, I changed the DATABASE path to:

Code:
'/maraschino.db'

entered the user/pass of xbmc/xbmc in XBMC web interface. Ran setup.py and got:

Code:
Database successfully initialised

then tried "start python maraschino-cherry.py" again and i get another window pop up for a nanosecond then disappear. Do i have to now open up a browser at a certain IPTongueort location? NOthing happens after the second window pops up VERY briefly.

Thanks

Ok, your database should be located at the root of your system drive ("C:\maraschino.db"), when you put "start" in front of a command like Python it just makes it open in a new window so you can continue doing what you want/need. So to test what your error is, run "python maraschino-cherrypy.py" and let me know what it says if there is an error. If there isn't any errors and you're running maraschino on your local system, you should be able to open a browser window and go to http://localhost:7000 or if running from a different system, change localhost to the IP of that system (ex. http://192.168.1.2:7000)


- Shaolin - 2011-11-14

Yes, the database is on the root of my system but I'm still getting the same socket error im afraid when running:

python maraschino-cherrypy.py

Code:
C:\XBMC-Maraschino>python maraschino-cherrypy.py
Traceback (most recent call last):
  File "maraschino-cherrypy.py", line 10, in <module>
    server.start()
  File "C:\Python27\lib\site-packages\cherrypy-3.2.2-py2.7-win32.egg\cherrypy\wsgiserver\wsgiserver2.py", line 1824, in start
    raise socket.error(msg)
socket.error: No socket could be created



- Rumik - 2011-11-14

Unfortunately that hasn't fixed it Sad


Here's my settings.py


DATABASE = '/Users/Ryan/Downloads/maraschino/maraschino.db'

CHERRYPY_PORT = 7000

#AUTH = {
# 'username': 'XXX',
# 'password': 'YYY'
#}

PORT = 5000



Should there already be a marsaschino.db file? Cause there isn't one (assuming it gets created).

Cheers


- Shaolin - 2011-11-14

Rumik Wrote:Unfortunately that hasn't fixed it Sad


Here's my settings.py


DATABASE = '/Users/Ryan/Downloads/maraschino/maraschino.db'

CHERRYPY_PORT = 7000

#AUTH = {
# 'username': 'XXX',
# 'password': 'YYY'
#}

PORT = 5000



Should there already be a marsaschino.db file? Cause there isn't one (assuming it gets created).

Cheers
It should get created when you run "Python setup.py" from inside your maraschino folder assuming your settings.py is correct. That's pretty much where I am up to, created the database, but then i hit a brick wall.


- Archigos - 2011-11-14

@Shaolin and @Rumik

Open and Admin Command Prompt and complete the following (1 per line)
Code:
cd "Python27\Scripts"
easy_install cherrypy
cd \
mkdir HTPC-Apps
cd HTPC-Apps
mkdir Maraschino
Leave the Command Prompt Open and MOVE all your Maraschino related files (without the database file) into the new Maraschino directory. After you've moved the files, go back to the command prompt and do the following:
Code:
del settings.py
copy settings_example.py settings.py
notepad settings.py
Highlight everything in that file and delete it, then copy/paste the below into the file.
Code:
DATABASE = '/HTPC-Apps/Maraschino/maraschino.db'
CHERRYPY_PORT = 7000
PORT = 5001
AUTH = {
    'username': 'xbmc',
    'password': 'xbmc'
}
Change the Username and Password to match your XBMC Web Interface.
Now run (from inside the Maraschino directory).
Code:
Python setup.py
and you should get a message that says: Database successfully initialised if you do not, post whatever error message shows up. If you get that message, type
Code:
python maraschino-cherrypy.py
which should start inside the same window. The CherryPy version does not output anything to the command window, so if it just looks like it did nothing (no text/errors) it should be working. If it is, open your web browser to http://localhost:7000 and you should see the page to start configuring it the way you want.


- Rumik - 2011-11-14

Thanks for going to all the effort of trying to fix this for us Smile

Unfortunately, same problem Sad


C:\HTPC-Apps\Maraschino>Python setup.py
You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.


- Shaolin - 2011-11-14

Thanks for all the assistance with this.

I followed those instructions to the letter, I now have the HTPC-Apps/Maraschino directory and have created maraschino.db in that directory but when i try

"python maraschino-cherrypy.py" i still get the socket error i listed above Eek

I'm open to you taking control via teamviewer if you are lol


- Archigos - 2011-11-14

Rumik Wrote:Thanks for going to all the effort of trying to fix this for us Smile

Unfortunately, same problem Sad


C:\HTPC-Apps\Maraschino>Python setup.py
You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.

From the Python27\Scripts directory in a command prompt, re-run "easy_install Flask-SQLAlchemy", you may have had a typo when you did it the first time, after running that, try to do "Python setup.py" from the Maraschino directory again and it should solve that.


- Rumik - 2011-11-14

Thanks, that finally sorted it Smile So I ran setup.py and it said it all installed correctly, and so then I ran python maraschino-cherrypy.py and a window popped up for a second and then nothing. I can't get to the webpage on that address, and I haven't changed the port, so it should work if it's running. I just don't think it's running Sad


- Rumik - 2011-11-15

C:\HTPC-Apps\Maraschino>python maraschino-cherrypy.py
Traceback (most recent call last):
File "maraschino-cherrypy.py", line 1, in <module>
from cherrypy import wsgiserver
ImportError: No module named cherrypy