Forums

Something went wrong :-(

Hello,

This my first try with hosting python web app somewhere else than on my local computer. My app seems to work fine locally when I run the command "python flask_app.py". I can access to my rest API through 'http://127.0.0.1:5000'.

But after having deployed it on PAW, I can't make it work. It seems that I don't need to run any command to make the server up, but when I try to access my app through '<username>.pythonanywhere.com' I got the "Something went wrong :-(" page.

By the way, how can I know the port on which the flask server is running ?

[edit by admin]

It's running on port 80 for http, or port 443 for https.

To help debug the "Something went wrong :-(", have a look at the error log for your web app.

Thanks for your answer, my app requires urllib2, I wonder if by default the installed 2.7 python includes this library. I tried to installed it anyway with pip install --user urllib2 but without success :(

Edit After having run the command help('modules') it seems that urllib2 is installed, so that's not the cause of the error.

Ok, I think I got it, according to that post: stackoverflow only a predefined list of external sites can be accessed with urllib2. I guess mixpanel is not part of it :(

IF they have a public API, send us a link to the docs and we'll add the site to the whitelist.

I don't know if you will consider this API public, but here is the link to the documentation: https://mixpanel.com/docs/api-documentation/data-export-api

Access to this API requires API key and Secret Key to be granted. Does it makes it public anyway ?

The main thing we're looking for is that the service is expecting programatic access. So mixpanel is fine. I have added it to the whitelist.

Great ! It now works perfectly, thanks. And congratulation for your service, I tried several other service to host python code, and to me Python Anyywhere is the best one.

Thanks!

http://ibukunoluwa.pythonanywhere.com/

This has no error log

We had a problem with our logging system yesterday, so I think that might have been the cause of that problem -- it's fixed as of 6pm UTC, and it looks like your site is logging errors correctly now.