Hi, when I tried to run the code below, the code will randomly succeed, some other time I'm getting this WinError 10013 issue
Here's the error, I already disabled the antivirus software but the issue still exist:
Traceback (most recent call last):
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Users\c84183129\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\Users\c84183129\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
run()
File "c:\Users\c84183129\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Users\c84183129\Documents\TEST\quickstart.py", line 70, in <module>
file.Upload()
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive2\files.py", line 497, in Upload
self._FilesInsert(param=param)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive2\auth.py", line 84, in _decorated
return decoratee(self, *args, **kwargs)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive2\files.py", line 627, in _FilesInsert
self.auth.service.files()
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\googleapiclient\_helpers.py", line 131, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\googleapiclient\http.py", line 901, in execute
_, body = self.next_chunk(http=http, num_retries=num_retries)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\googleapiclient\_helpers.py", line 131, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\googleapiclient\http.py", line 1006, in next_chunk
resp, content = _retry_request(
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\googleapiclient\http.py", line 190, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\oauth2client\transport.py", line 173, in new_request
resp, content = request(orig_request_method, uri, method, body,
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\oauth2client\transport.py", line 280, in request
return http_callable(uri, method=method, body=body, headers=headers,
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2\__init__.py", line 1725, in request
(response, content) = self._request(
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2\__init__.py", line 1441, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2\__init__.py", line 1363, in _conn_request
conn.connect()
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2\__init__.py", line 1199, in connect
raise socket_err
File "C:\Users\c84183129\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2\__init__.py", line 1153, in connect
sock.connect((self.host, self.port))
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Hi, when I tried to run the code below, the code will randomly succeed, some other time I'm getting this WinError 10013 issue
Here's the error, I already disabled the antivirus software but the issue still exist: