Python Forum
Socket Issue due to AF_UNIX
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Socket Issue due to AF_UNIX
#1
Hello, I am on Windows and trying to run this Python Discord Bot script from github.

However, it appears that the socket is UNIX and therefore I get this error:

Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python38-32\BOTNAME.py", line 43, in <module>
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
NameError: name 'socket' is not defined


Will it not socket correctly because I'm on Windows? I have replaced instances of UNIX with INET instead and the script executed but it did not work correctly..

I have installed Cygwin and I'm using running the script there but then I receive this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 76
async def on_ready():


I guess Cygwin doesn't understand async?

Any help appreciated!!
Reply
#2
spacemaker18 Wrote:NameError: name 'socket' is not defined
This is impossible, because you have import socket at line 4.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020