Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3出现报错 #1

Open
lithromantic opened this issue May 5, 2018 · 2 comments
Open

python3出现报错 #1

lithromantic opened this issue May 5, 2018 · 2 comments

Comments

@lithromantic
Copy link

root@raspberrypi:~/wechat_print_bot# python3 buu.py
Traceback (most recent call last):
File "buu.py", line 5, in
import buu_msg_handle
File "/root/wechat_print_bot/buu_msg_handle.py", line 1, in
import buu_config, buu_command_dict, buu_database
File "/root/wechat_print_bot/buu_command_dict.py", line 1, in
import buu_config, buu_database
File "/root/wechat_print_bot/buu_database.py", line 2, in
import buu_config, buu_model
File "/root/wechat_print_bot/buu_model.py", line 4, in
class class_model(object):
File "/root/wechat_print_bot/buu_model.py", line 8, in class_model
host = buu_config.config.mysql_addr, db = buu_config.config.mysql_database)
File "/usr/local/lib/python3.4/dist-packages/sqlobject/mysql/mysqlconnection.py", line 99, in init
'Cannot find a MySQL driver, tried %s' % drivers)
ImportError: Cannot find a MySQL driver, tried mysqldb

上面的是报错日志,服务器上和树莓派上测试的都是一样的报错,不知道是哪里的问题.

@glzjin
Copy link
Owner

glzjin commented May 5, 2018

https://m.jb51.net/article/54120.htm

尝试装一下mysql的支持库

@lithromantic
Copy link
Author

https://raspberrypi.stackexchange.com/questions/78215/how-to-connect-mysqldb-in-python-3
用这个解决了, 但是发现生成的二维码有问题,如下:
360截图16350910153452.png
谢谢赵大

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants