鱼C论坛

 找回密码
 立即注册
查看: 1798|回复: 5

vscode写python的报错

[复制链接]
发表于 2021-4-13 19:04:25 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
No name 'clock_in' in module 'clock_in'pylint(no-name-in-module)

这个应该怎么解决?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-4-13 19:29:04 | 显示全部楼层
发代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-4-13 19:29:24 | 显示全部楼层
脚本名称不要和调用的模块或函数名称相同。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-4-13 20:24:27 | 显示全部楼层

import argparse
from load_from_cookies import load_from_cookies
from login import login
from clock_in import clock_in, helper

parser = argparse.ArgumentParser()
parser.add_argument('-d', help='Future card', type=int)
args = parser.parse_args()

students = {}

with open('stu_id.txt', mode='r') as f:
    for line in f:
        stu = line.split(' ')
        stu = [x.strip() for x in stu]
        students[stu[0]] = stu[1]

for id in students:
    print ('Student loaded: {}'.format(id))

print()
print('开始打卡...')

for id in students:
    login(id, students[id])
    #clock_in(id)
    if args.d:
        helper(id, days=args.d)
    else:
        helper(id)
我是想调用clock_in.py的,结果就出错了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-4-13 20:39:29 | 显示全部楼层
不知道是网不行还是其他原因,每次下载vscode网页都会崩溃,大佬你是怎么解决的?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-4-14 15:13:49 | 显示全部楼层
超现实的n 发表于 2021-4-13 20:39
不知道是网不行还是其他原因,每次下载vscode网页都会崩溃,大佬你是怎么解决的?

https://code.visualstudio.com/
官网下载应该没错吧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-12 21:47

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表