Skip to content

不能直接拿来运行吗?错误信息如下 #3

Description

@TanHudong

Traceback (most recent call last):
File "D:/workspace/Python/spiderWanghong/huajiao.py", line 137, in
class BoseModel(Model):
File "D:/workspace/Python/spiderWanghong/huajiao.py", line 138, in BoseModel
conn = Mysql(host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='root', passwd='123456', db='wanghong', charset='utf8')
File "D:\workspace\Python\spiderWanghong\mysql.py", line 14, in new
cls.connect(**params)
File "D:\workspace\Python\spiderWanghong\mysql.py", line 22, in connect
cls.conn = pymysql.connect(**params)
File "D:\IDE\Python\Python36\lib\site-packages\pymysql_init_.py", line 90, in Connect
return Connection(*args, **kwargs)
File "D:\IDE\Python\Python36\lib\site-packages\pymysql\connections.py", line 706, in init
self.connect()
File "D:\IDE\Python\Python36\lib\site-packages\pymysql\connections.py", line 903, in connect
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
AttributeError: module 'socket' has no attribute 'AF_UNIX'

Process finished with exit code 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions