qq_52039505
邓九久
2021/01/20 22:53
  • 小程序
  • python
  • 微信小程序

 

0个回复
markvanten
St.Mark
2021/01/20 22:12
  • python
  • sql
  • mysql
import pymysql
db = pymysql.connect('localhost','root','mkfmkf','mrsoft')
cursor = db.cursor()
cursor.execute('SELECT VERSION')
date = cursor.fetchone()
print('Date:%s'%date)
db.close




Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 
===================== RESTART: D:\Python\数据库练习\chage.py =====================
Traceback (most recent call last):
  File "D:\Python\数据库练习\chage.py", line 2, in <module>
    db = pymysql.connect('localhost','root','mkfmkf','mrsoft')
TypeError: __init__() takes 1 positional argument but 5 were given
>>> 

 

1个回复
qq_37253201
村丶征
2021/01/20 21:45
  • python

import random

x = [i for i in range(10)]
value=random.shuffle(x)
print(value)

1个回复
weixin_44425748
cx嘎嘎
2021/01/20 21:30
  • python

报的错:

Traceback (most recent call last):
  File "E:/chenxin/yolo/yolov5-3.1/train.py", line 491, in <module>
    log_dir = increment_dir(Path(opt.logdir) / 'exp', opt.name)  # runs/exp1
AttributeError: 'Namespace' object has no attribute 'logdir'

代码部分:

 

0个回复
ATMxuxu
ATMxuxu
2021/01/20 21:07
  • 神经网络
  • python
  • tensorflow

0个回复