question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Socket not connected.

See original GitHub issue

Getting the error: OSError: [WinError 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

While trying to set up a socks4 proxy in my request class: that gets inherited by a client class.

class Session:

    def __init__(self):
        self.p = proxies.get()
        print(self.p)

        connector = SocksConnector.from_url('%s://%s:%s' % (
            self.p['type'], self.p['host'], self.p['port']))

        self.s = aiohttp.ClientSession(connector=connector)

    def request(self, method, url, **kwargs):
        return self.s.request(method, url, **kwargs)

    async def close(self):
        await self.s.close()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GHXST01commented, Aug 17, 2018

This is fixed! Working as intended, thank you for your fix @romis2012 ! Can you explain what the issue was? I’d like to know 😄 .

1reaction
GHXST01commented, Aug 17, 2018

You’re a beast 💪 . Checking it out in a hour or 2 and closing the issue if it’s working for me! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix: ERR_SOCKET_NOT_CONNECTED - Appuals.com
Solution 1: Flushing the Socket Pool ... The error message “ERR_SOCKET_NOT_CONNECTED” is instantly solved in the majority of the cases when we ...
Read more >
ERR_SOCKET_NOT_CONNECT...
Some users have been reporting an error for Google Chrome that says ERR SOCKET NOT CONNECTED. This is a pretty vague error but...
Read more >
How to fix ERR_SOCKET_NOT_CONNECTED error in ...
Option 1. Flush the Socket Pool · Option 2. Change DNS Server · Option 3. Clear browser applications · Option 4. Reset the...
Read more >
[FiXED] NET ERR_SOCKET_NOT_CONNECTED Error Problem
From this NET ERR SOCKET NOT CONNECTED error, you couldn't access the site you are trying to open. This error is also caused...
Read more >
How to fix err_socket_not_connected on chrome - YouTube
Here are 2 steps on how to fix chrome error: Socket_Not_Connected( Socket not connected )URL 1 : chrome://net-internalsURL 2: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found