Missing file?
I'm not sure if you supplied all the files here. I get 404 when I run, there is no /web/text directory and I have no idea what is supposed to go in there. Please shed some light on this issue.
There is no /web/text/ directory, it is a dynamic URL route which is handled by the function evaldata() in server.py. How are you running the server?
I'm guessing it's the way I set it up. I followed the instructions you provided in the readme. The folder contents are set up like this: domain -->directory ---->python files -------->template
On button press, index just returns the 404 as I said.
When I run "nohup python run.py &"
I get "nohup: ignoring input and appending output to `nohup.out'"
Or it could be my config file:
HOST="http://pedrumgolriz.com" PORT=80 STATS_KEY="sentiment_stats" RHOST='' RPORT=6379 RPASS=None
The nohup part is just to make it run in the background after you quit the terminal or ssh session. Try without nohup ( python run.py ) and you'll get to know about what went wrong. Most likely you might not have privileges to open port 80, you would have to run it as root or with sudo.
I managed to get it running of sorts. It turned out I had Python 2.6 installed not 2.7 (stupid mistake sorry). RIght now I'm delving in the config file to see what is wrong since I can only get error 500's. The output from the console once I exit the program:
python2.7 run.py
50.246.115.114 - - [2014-04-11 16:00:52] "GET / HTTP/1.1" 500 291 "-" "Mozilla/5.0 (Windo
ws NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.
36"
^CTraceback (most recent call last):
File "run.py", line 9, in
Did you install all the dependencies using pip? Setting app.debug = True in the server.py file might be useful here.
Okay, I'm now nearly 100% sure it is a problem with my configuration. No matter what I put in the host variable, it always shows as 0.0.0.0:xxxx in the terminal: ConnectionError: Error -2 connecting :. Name or service not known. <WSGIServer fileno=3 address=0.0.0.0:44320>: Failed to handle request: request = <http_request "GET / HTTP/1.1" > application = <Flask 'server'>
The HOST variable in the config file is just for rendering HTML. Just noticed that your user agent says "Windows", are you using Windows to run the server? I'm not sure if gevent plays well with windows, and have never tested this on it.
The server is running on CentOS, I was just visiting the script from a windows machine. So would the HOST variable be set to the domain? The sentiment script is a few folders deep in the domains file system. Also, this server is hosting multiple domains. The script is not under the main domain. So should the host be set to the IP of the main one? Sorry for all the questions, I really want to see this working.
Oh, in that case edit this line in run.py
http_server = WSGIServer(('', config.PORT), app)
and change it to
http_server = WSGIServer(('your-host-name', config.PORT), app)