Why does the Google Calendar Quickstart for Python give me an OSError (WinError 10013) (access socket in a way forbidden)2019 Community Moderator ElectionHow to run python script with elevated privilege on windowssocket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionssocket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionsWhy does Python code run faster in a function?Python flask apps on LightTPD (Windows) get [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionspython executable gives error 10013 :an attempt was made to access a socket in a way forbidden by its access permissionspython google-auth-oauthtool to get access tokenPython Selenium shows OS ErrorPython ftplib OSError: [WinError 10013] on STOR operationOSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissionsOSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions while running in PyCharm environmentsql server 2017 ml services python - access a socket in a way forbidden by its access permissions
Should I take out a loan for a friend to invest on my behalf?
Why would one plane in this picture not have gear down yet?
Are the terms "stab" and "staccato" synonyms?
Why the color red for the Republican Party
Making a sword in the stone, in a medieval world without magic
Could you please stop shuffling the deck and play already?
Does splitting a potentially monolithic application into several smaller ones help prevent bugs?
Low budget alien movie about the Earth being cooked
What to do when during a meeting client people start to fight (even physically) with each others?
How do I locate a classical quotation?
Are babies of evil humanoid species inherently evil?
Placing subfig vertically
Why does Captain Marvel assume the people on this planet know this?
Why is this plane circling around the Lucknow airport every day?
Why does Deadpool say "You're welcome, Canada," after shooting Ryan Reynolds in the end credits?
Is "history" a male-biased word ("his+story")?
How to pass a string to a command that expects a file?
Time travel short story where dinosaur doesn't taste like chicken
Do Bugbears' arms literally get longer when it's their turn?
Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?
Is there an equal sign with wider gap?
Does "variables should live in the smallest scope as possible" include the case "variables should not exist if possible"?
Virginia employer terminated employee and wants signing bonus returned
Aliens englobed the Solar System: will we notice?
Why does the Google Calendar Quickstart for Python give me an OSError (WinError 10013) (access socket in a way forbidden)
2019 Community Moderator ElectionHow to run python script with elevated privilege on windowssocket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionssocket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionsWhy does Python code run faster in a function?Python flask apps on LightTPD (Windows) get [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissionspython executable gives error 10013 :an attempt was made to access a socket in a way forbidden by its access permissionspython google-auth-oauthtool to get access tokenPython Selenium shows OS ErrorPython ftplib OSError: [WinError 10013] on STOR operationOSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissionsOSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions while running in PyCharm environmentsql server 2017 ml services python - access a socket in a way forbidden by its access permissions
I followed Google's Quickstart for Python, step-by-step. I followed each step exactly, often copying and pasting. I definitely have the Google Calendar API enabled. I've installed the Google Client Library with Pip. I've set up the sample code and the credentials.json in its own folder. So, why am I getting this error when I run it:
"OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
To figure this out, I've learned what a socket is. (It's literally the combination of an IP address and a single port). I've learned how to use netstat, though I don't know yet how this applies to what I'm doing. I've looked into using ShellExecuteEx based on an answer in this question, but I don't know how to use that with Python.
I've tried adding the script from the accepted answer to this question (which actually uses the ShellExecuteEx method though I don't notice this) into an admin.py file and import this admin.py script into quickstart.py. After updating the admin.py script to Python 3 syntax and running quickstart.py, Windows 8.1 asks me if I will allow access. I say yes, and it still gives me the OSError (WinError 10013) on accessing the socket in a forbidden way. The UAC is not the issue.
I suspect it's a port conflict, where something's already using the port that the script that Google's trying to use. But I'm worried that the port is decided by a black box function that I won't be able to change. The error itself doesn't say which port it's using, so I'll need to do more research.
python python-3.x
add a comment |
I followed Google's Quickstart for Python, step-by-step. I followed each step exactly, often copying and pasting. I definitely have the Google Calendar API enabled. I've installed the Google Client Library with Pip. I've set up the sample code and the credentials.json in its own folder. So, why am I getting this error when I run it:
"OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
To figure this out, I've learned what a socket is. (It's literally the combination of an IP address and a single port). I've learned how to use netstat, though I don't know yet how this applies to what I'm doing. I've looked into using ShellExecuteEx based on an answer in this question, but I don't know how to use that with Python.
I've tried adding the script from the accepted answer to this question (which actually uses the ShellExecuteEx method though I don't notice this) into an admin.py file and import this admin.py script into quickstart.py. After updating the admin.py script to Python 3 syntax and running quickstart.py, Windows 8.1 asks me if I will allow access. I say yes, and it still gives me the OSError (WinError 10013) on accessing the socket in a forbidden way. The UAC is not the issue.
I suspect it's a port conflict, where something's already using the port that the script that Google's trying to use. But I'm worried that the port is decided by a black box function that I won't be able to change. The error itself doesn't say which port it's using, so I'll need to do more research.
python python-3.x
add a comment |
I followed Google's Quickstart for Python, step-by-step. I followed each step exactly, often copying and pasting. I definitely have the Google Calendar API enabled. I've installed the Google Client Library with Pip. I've set up the sample code and the credentials.json in its own folder. So, why am I getting this error when I run it:
"OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
To figure this out, I've learned what a socket is. (It's literally the combination of an IP address and a single port). I've learned how to use netstat, though I don't know yet how this applies to what I'm doing. I've looked into using ShellExecuteEx based on an answer in this question, but I don't know how to use that with Python.
I've tried adding the script from the accepted answer to this question (which actually uses the ShellExecuteEx method though I don't notice this) into an admin.py file and import this admin.py script into quickstart.py. After updating the admin.py script to Python 3 syntax and running quickstart.py, Windows 8.1 asks me if I will allow access. I say yes, and it still gives me the OSError (WinError 10013) on accessing the socket in a forbidden way. The UAC is not the issue.
I suspect it's a port conflict, where something's already using the port that the script that Google's trying to use. But I'm worried that the port is decided by a black box function that I won't be able to change. The error itself doesn't say which port it's using, so I'll need to do more research.
python python-3.x
I followed Google's Quickstart for Python, step-by-step. I followed each step exactly, often copying and pasting. I definitely have the Google Calendar API enabled. I've installed the Google Client Library with Pip. I've set up the sample code and the credentials.json in its own folder. So, why am I getting this error when I run it:
"OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
To figure this out, I've learned what a socket is. (It's literally the combination of an IP address and a single port). I've learned how to use netstat, though I don't know yet how this applies to what I'm doing. I've looked into using ShellExecuteEx based on an answer in this question, but I don't know how to use that with Python.
I've tried adding the script from the accepted answer to this question (which actually uses the ShellExecuteEx method though I don't notice this) into an admin.py file and import this admin.py script into quickstart.py. After updating the admin.py script to Python 3 syntax and running quickstart.py, Windows 8.1 asks me if I will allow access. I say yes, and it still gives me the OSError (WinError 10013) on accessing the socket in a forbidden way. The UAC is not the issue.
I suspect it's a port conflict, where something's already using the port that the script that Google's trying to use. But I'm worried that the port is decided by a black box function that I won't be able to change. The error itself doesn't say which port it's using, so I'll need to do more research.
python python-3.x
python python-3.x
edited Mar 7 at 7:39
Aaron Bell
asked Mar 7 at 1:48
Aaron BellAaron Bell
715
715
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It is a port issue.
- Go to line 34 on the quickstart.py file (or where it says creds =
run_local_server()). - Go to the flow.py file in the
google_auth_oauthlib package with this function (in VS Code, click
run_local_server() and press F12 or right click and select "Go to
Definition").
You'll see line 369 (at the time of this writing) say self, host='localhost', port=8080,
.
When I look at netstat, it actually says this port is in use, probably with an Apache server I never turned off.
- Change the value in the flow.py file in the google_auth_oauthlib package to 8090, so 369 looks like
self, host='localhost', port=8090,
.
I ran the quickstart.py script again, and the window to authenticate my Google account popped up.
I selected my account, and it worked. No messing with the admin stuff.
I'm glad I was able to find it like this because I thought the port was selected in some black box manner, like it was decided from a server at Google.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034837%2fwhy-does-the-google-calendar-quickstart-for-python-give-me-an-oserror-winerror%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is a port issue.
- Go to line 34 on the quickstart.py file (or where it says creds =
run_local_server()). - Go to the flow.py file in the
google_auth_oauthlib package with this function (in VS Code, click
run_local_server() and press F12 or right click and select "Go to
Definition").
You'll see line 369 (at the time of this writing) say self, host='localhost', port=8080,
.
When I look at netstat, it actually says this port is in use, probably with an Apache server I never turned off.
- Change the value in the flow.py file in the google_auth_oauthlib package to 8090, so 369 looks like
self, host='localhost', port=8090,
.
I ran the quickstart.py script again, and the window to authenticate my Google account popped up.
I selected my account, and it worked. No messing with the admin stuff.
I'm glad I was able to find it like this because I thought the port was selected in some black box manner, like it was decided from a server at Google.
add a comment |
It is a port issue.
- Go to line 34 on the quickstart.py file (or where it says creds =
run_local_server()). - Go to the flow.py file in the
google_auth_oauthlib package with this function (in VS Code, click
run_local_server() and press F12 or right click and select "Go to
Definition").
You'll see line 369 (at the time of this writing) say self, host='localhost', port=8080,
.
When I look at netstat, it actually says this port is in use, probably with an Apache server I never turned off.
- Change the value in the flow.py file in the google_auth_oauthlib package to 8090, so 369 looks like
self, host='localhost', port=8090,
.
I ran the quickstart.py script again, and the window to authenticate my Google account popped up.
I selected my account, and it worked. No messing with the admin stuff.
I'm glad I was able to find it like this because I thought the port was selected in some black box manner, like it was decided from a server at Google.
add a comment |
It is a port issue.
- Go to line 34 on the quickstart.py file (or where it says creds =
run_local_server()). - Go to the flow.py file in the
google_auth_oauthlib package with this function (in VS Code, click
run_local_server() and press F12 or right click and select "Go to
Definition").
You'll see line 369 (at the time of this writing) say self, host='localhost', port=8080,
.
When I look at netstat, it actually says this port is in use, probably with an Apache server I never turned off.
- Change the value in the flow.py file in the google_auth_oauthlib package to 8090, so 369 looks like
self, host='localhost', port=8090,
.
I ran the quickstart.py script again, and the window to authenticate my Google account popped up.
I selected my account, and it worked. No messing with the admin stuff.
I'm glad I was able to find it like this because I thought the port was selected in some black box manner, like it was decided from a server at Google.
It is a port issue.
- Go to line 34 on the quickstart.py file (or where it says creds =
run_local_server()). - Go to the flow.py file in the
google_auth_oauthlib package with this function (in VS Code, click
run_local_server() and press F12 or right click and select "Go to
Definition").
You'll see line 369 (at the time of this writing) say self, host='localhost', port=8080,
.
When I look at netstat, it actually says this port is in use, probably with an Apache server I never turned off.
- Change the value in the flow.py file in the google_auth_oauthlib package to 8090, so 369 looks like
self, host='localhost', port=8090,
.
I ran the quickstart.py script again, and the window to authenticate my Google account popped up.
I selected my account, and it worked. No messing with the admin stuff.
I'm glad I was able to find it like this because I thought the port was selected in some black box manner, like it was decided from a server at Google.
answered Mar 7 at 1:48
Aaron BellAaron Bell
715
715
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034837%2fwhy-does-the-google-calendar-quickstart-for-python-give-me-an-oserror-winerror%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown