New tab with provided url is not opening in Ubuntu 14.04 Same code works in Mac OS X Yosemite
I have flask installed on both Ubuntu 14.04 and Mac Yosemite Both have python 2.7.6 installed
Below is the source code:
import webbrowser
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/', methods=['POST'])
def submit():
url = 'https://www.google.com'
webbrowser.open(url, new=0, autoraise=True)
return render_template("index.html")
if __name__ == '__main__':
app.debug = True
app.run()
I am accessing the flask app on Mac on port 5000
whereas on Ubuntu I am accessing it on port 8080
Let me know what more information I need to provide to help me debug.
After Debugging I think whether this behavior is because of SSL certificate issue?
In order to debug, I tried to create the environment on server same as my local machine where it is working.
BI stopped the apache web server on my server and launched the flask app manually (so that I can access the page on port 5000) and tried to launch the page using http://127.0.0.1:5000
I observed that the python logs in the terminal were erased and the screen showed "≪ ↑ ↓ Viewing[SSL] <Google Maps>
" in the bottom