I have created a Bottle Py website and deployed it to Azure Websites, but now I have made some changes and when I published it Site again, the site gave an internal error. When I tried to attach debugger received below error
"Existing connection is forcefully closed by remote host"
Update: I posted the same in PTVS Discussions and got the answer there, possibly this might get fixed in RTM.
https://pytools.codeplex.com/discussions/551920
Did you enable web sockets for your website in Azure management console?
Related
when I try to use python + Selenium to run my code, the error message shows in the terminal during the program is running, it has no effect of my program, but sort of annoying, does anyone have any solution to tell me why the error shows, and how to disable the error message.
my network is located in China, and our network policy disables the access to Google, is the may the cause?
[21792:15920:1230/144009.402:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
anyway, thanks in advance.
Note: This is not a definitive answer; it is very rough conclusions drawn from a quick investigation.
GCN is Google Cloud Messaging. It appears that the Selenium Chrome extension is using GCN. See for example https://pushwizard.com/chrome-gcm-messaging.
I see these messages when my Python Selenium Chrome application is sleeping and I hibernate the machine. It may occur at other times.
I surmise that the Selenium Python backend is using GCN and uses a ping or keep-alive type of message to find out if the Chrome browser is still there. I further surmise that since my Python application takes much less memory than the Chrome browser, my app wakes up first, pings the browser, and reports that there was no response.
Since it's not causing a problem this is enough for me.
Google Cloud Messaging is deprecated - you should use Firebase Cloud Messaging instead.
You may need to update your selenium webdriver for chrome.
Since your access to google ( and I think google services too ) is disabled this also could be the issue. To test this, you should go and implement the selenium application with firefox (or any other non chromium based browser) ; which shouldn't use google services inherently. ( but i am not 100% sure about that )
I have been working on a flask application and it has been working just fine. however, for a couple of hours now, i have not been able to run my application on the web. After running the script on command line as usual, i would copy the ip address to my browser in order to display its content but will not respond anymore. I have tried changing port, and other troubleshooting i suppose should work but has still not been able to get it fixed. Any assistance is highly appreciated.
The error message is " this site can not be reached" when is actually running on the server in command line.
I've been following this guide:
https://developers.google.com/drive/v3/web/quickstart/python
and did everything up to the
python quickstart.py
part. When I do that it opens up a new browser (oddly not my default browser but whatever) and I get the OAuth screen, but once I click "Allow" it gives me a "localhost didn't send any data" error. The shell has:
/Library/Python/2.7/site-packages/oauth2client/_helpers.py:255:
UserWarning: Cannot access /Users/timothy.tran/.credentials/drive-
python-quickstart.json: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
0:297: execution error:
What does this mean and how can I fix it?
It means it cannot access this file:
Cannot access /Users/timothy.tran/.credentials/drive-
python-quickstart.json
because:
No such file or directory
I just got this quickstart running a while ago. When you click the oauth link generated by python commandline and it opens a random browser, copy that link and paste it in the browser where your gmail account (which you're also using in your google dev console) is currently logged-in. Let me know if you're still stuck after this.
Also I don't think you need a localhost to run this. If anything, I'd used a python virtual environment.
I deployed a bottle website on Azure but it shows 500 (internal error) and I can’t see the log. I refer to https://github.com/Microsoft/PTVS/wiki/Azure-Remote-Debugging to debug my project but it failed.
It shows the error message as below.
could not attach to python.exe process on Azure web site at testpybottleapp.azurewebsites.net.
Error retrieving websocket debug proxy information from web.config.
And when I try to open http://testpybottleapp.azurewebsites.net/ptvsd it said ptvsd not existed.
Have you considered using VorlonJS as well? It's a remote website debugger which may help in this case.
Alternatively, could you try grabbing a similar VM from VMDepot, uploading that, and seeing if you have the same issue? That could help us troubleshoot and understand if the issue lies in the VM itself, or one of the configuration settings.
If we want to use the remote debug on Azure for python website, we should set the publish mode as "debug". And then we should enable websocket.
Meanwhile I suggest you can try to use the debug=>Attach to Process and input wss://WSGI_PTVSD_SECRET#WEBSITE_NAME.azurewebsites.net/ptvsd. When the process (Python.exe) is shown,you can click the "Attach". Then you can open your website http://WEBSITE_NAME.azurewebsites.net in browser.
If you visit the URL like "http://mysite.azurewebsites.net/ptvsd" and get the "ptvsd not existed" error, Please double check these points:
You should publish your website as Debug mode not release mode.
Make sure the 'WSGI_PTVSD_SECRET' in local is same as the Azure website .
I am using pycharm (v4.5.3) and the pyramid web framework (v1.5.7).
I created a simple project, but I got an error when I tried to access the welcome page (that is in my case 0.0.0.0:6543).
Here are the steps I followed:
Installed python 3.4.3 and pycharm 4.5.3 (professional edition)
Created a project with pycharm (without creating an env because of the pro edition)
Selected scaffold "starter" and no template language because I read that could cause an error
Using pycharm GUI I ran "setup.py develop". The server starts at 0.0.0.0:6543 but the connection does not work. According to a video I watched on Youtube, a welcome page should appear. Indeed it appears only if I type "localhost:6543"; however my server is listening on 0.0.0.0:6543.
Can anyone help me?
0.0.0.0 is a "meta address" which tells the server to listen on all available local interfaces. This address is non-routable, so you can't access the server by specifying this address - you need a real IP of one of your machine's network interfaces