Git Product home page Git Product logo

pythonpractice's People

Contributors

258409205 avatar octans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pythonpractice's Issues

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

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

self.tbl在mysql.py中没有定义

没看到你在mysql.py这个文件中定义self.tbl就直接在48行使用了。
另外,Model类中的select方法,没有必要对例如select_str = '123, abc' 中的逗号进行处理吧,可以直接用select 123, abc from tbl。为什么非要用select '123', 'abc' from tbl呢?
请大神指点一二,谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.