Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

IOError: [Errno 0] Error看此issues #159

Closed
walker4753 opened this issue Jan 11, 2019 · 105 comments
Closed

IOError: [Errno 0] Error看此issues #159

walker4753 opened this issue Jan 11, 2019 · 105 comments

Comments

@walker4753
Copy link

下单接口: 2
下单模式: 2
预售踩点时间:13:00:00 Traceback (most recent call last):
File "run.py", line 15, in
run()
File "run.py", line 7, in run
select_ticket_info.select().main()
File "C:\Users\huang\Downloads\12306-master\init\select_ticket_info.py", line 50, in init
self.arrival_time, self.take_time, self.order_model, self.open_time, self.is_proxy = self.get_ticket_info()
File "C:\Users\huang\Downloads\12306-master\init\select_ticket_info.py", line 116, in get_ticket_info
open_time,
IOError: [Errno 0] Error

@bing15
Copy link

bing15 commented Jan 12, 2019

这个报错我也看到了,希望作者解决下

@walker4753
Copy link
Author

这个在windows上运行会报错,在linux上就可以正常运行!

@walker4753
Copy link
Author

下单接口: 2
下单模式: 2
预售踩点时间:13:00:00 Traceback (most recent call last):
File "run.py", line 15, in
run()
File "run.py", line 7, in run
select_ticket_info.select().main()
File "C:\Users\huang\Downloads\12306-master\init\select_ticket_info.py", line 50, in init
self.arrival_time, self.take_time, self.order_model, self.open_time, self.is_proxy = self.get_ticket_info()
File "C:\Users\huang\Downloads\12306-master\init\select_ticket_info.py", line 116, in get_ticket_info
open_time,
IOError: [Errno 0] Error

@testerSunshine
Copy link
Owner

这个为win系统不兼容导致,可以修改系统编码解决此问题
image

@testerSunshine testerSunshine changed the title 这个报错,open_time没有改过 IOError: [Errno 0] Error看此issues Jan 14, 2019
@alalbb313
Copy link

alalbb313 commented Jan 14, 2019

这个问题是CMD 当前代码页编码格式是 936(GBK) 导致的, 需要把CMD 窗口的代码页更改成UTF-8.
使用命令 chcp 65001 , 切换到65001(UTF-8) 编码. 如果还有问题 , 再切换到 GBK.

@BigandBang
Copy link

@huwl9112
Copy link

济南西-南京南 车次坐席查询为空,ip网络异常,查询url: https://kyfw.12306.cn/otn/leftTicket/queryZ?leftTicketDTO.train_date=2019-02-10&leftTicketDTO.from_station=JGK&leftTicketDTO.to_station=NKH&purpose_codes=ADULT, 可以手动查询是否有票,请问这个错是什么引起的??

@ltfafei
Copy link

ltfafei commented Jan 21, 2019

正在第282次查询 随机停留时长:2.99 乘车日期: 2019-02-23 车次:Z182 查询无票 cdn轮询IP:112.240.60.253当前cdn总数:150 总耗时:687ms
吉安-菏泽 车次坐席查询为空,ip网络异常,可能是时间配置未正确,查询url: https://kyfw.12306.cn/otn/leftTicket/queryZ?leftTicketDTO.train_date=2019-02-23&leftTicketDTO.from_station=VAG&leftTicketDTO.to_station=HIK&purpose_codes=ADULT, 可以手动查询是否有票

@ltfafei
Copy link

ltfafei commented Jan 21, 2019

同问

@dukewuzhao
Copy link

我修改了ticket_config的配置,运行还是默认的值
image

本次待筛选cdn总数为1857, 筛选时间大约为5-10min
Traceback (most recent call last):
File "run.py", line 20, in
run()
File "run.py", line 8, in run
select_ticket_info.select().main()
File "/Users/wuzhaohua/Desktop/12306-master/init/select_ticket_info.py", line 207, in main
self.call_login()
File "/Users/wuzhaohua/Desktop/12306-master/init/select_ticket_info.py", line 167, in call_login
self.login.go_login()
File "/Users/wuzhaohua/Desktop/12306-master/init/login.py", line 113, in go_login
raise UserPasswordException(u"温馨提示: 用户名或者密码为空,请仔细检查")
myException.UserPasswordException.UserPasswordException: 温馨提示: 用户名或者密码为空,请仔细检查

@dukewuzhao
Copy link

当前配置:
出发站:邵阳
到达站:深圳北
乘车日期:['2019-01-18']
坐席:二等座
是否有票优先提交:False
乘车人:
刷新间隔: 随机(1-3S)
购票方式:根据候选车次购买
候选购买车次:G6153,G6184,G6173

@DargonLee
Copy link

sudo python run.py
Password:
Traceback (most recent call last):
File "run.py", line 2, in
from config.emailConf import sendEmail
File "/Users/harlan/Desktop/12306/12306/config/emailConf.py", line 7, in
from config.ticketConf import _get_yaml
File "/Users/harlan/Desktop/12306/12306/config/ticketConf.py", line 6, in
import yaml
ImportError: No module named yaml

@ymmagic
Copy link

ymmagic commented Jan 31, 2019

mac系统登陆软件直接崩溃,win系统一直提示 File "12306\gui\login.py", line 119, in user_by_login
File "12306\inter\GetPassengerDTOs.py", line 41, in sendGetPassengerDTOs
AttributeError: 'Login' object has no attribute 'logText'

@DargonLee
Copy link

python run.py
Traceback (most recent call last):
File "run.py", line 2, in
from config.emailConf import sendEmail
File "/Users/apple/Desktop/12306/config/emailConf.py", line 7, in
from config.ticketConf import _get_yaml
File "/Users/apple/Desktop/12306/config/ticketConf.py", line 6, in
import yaml
ImportError: No module named yaml

@zhilianbi520
Copy link

python run.py
Traceback (most recent call last):
File "run.py", line 2, in
from config.emailConf import sendEmail
File "/Users/apple/Desktop/12306/config/emailConf.py", line 7, in
from config.ticketConf import _get_yaml
File "/Users/apple/Desktop/12306/config/ticketConf.py", line 6, in
import yaml
ImportError: No module named yaml

me too 求解~!!

@zzbgit
Copy link

zzbgit commented Sep 1, 2019

Traceback (most recent call last):
File "S:\Python-3.7.4\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "S:\Python-3.7.4\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "S:\Python-3.7.4\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
PermissionError: [WinError 5] 拒绝访问。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "S:/12306-master/run.py", line 20, in
run()
File "S:/12306-master/run.py", line 8, in run
select_ticket_info.select().main()
File "S:\12306-master\init\select_ticket_info.py", line 145, in main
getDrvicesID(self)
File "S:\12306-master\config\getCookie.py", line 12, in getDrvicesID
driver = webdriver.Chrome(TickerConfig.CHROME_PATH)
File "S:\Python-3.7.4\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "S:\Python-3.7.4\lib\site-packages\selenium\webdriver\common\service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'Scripts' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
求解

@liushijun
Copy link

liushijun commented Sep 3, 2019

mac环境报错
localhost:12306 liushijun$ sudo python run.py
Traceback (most recent call last):
File "run.py", line 3, in
from config.pushbearConf import sendPushBear
File "/Users/liushijun/work/codes/12306/config/pushbearConf.py", line 4, in
from myUrllib.httpUtils import HTTPClient
File "/Users/liushijun/work/codes/12306/myUrllib/httpUtils.py", line 6, in
import requests
ImportError: No module named requests

@Brandzhao01
Copy link

mac环境报错
localhost:12306 liushijun$ sudo python run.py
Traceback (most recent call last):
File "run.py", line 3, in
from config.pushbearConf import sendPushBear
File "/Users/liushijun/work/codes/12306/config/pushbearConf.py", line 4, in
from myUrllib.httpUtils import HTTPClient
File "/Users/liushijun/work/codes/12306/myUrllib/httpUtils.py", line 6, in
import requests
ImportError: No module named requests

me too

@shujianzhen
Copy link

老是提示验证码校验失败

检查当前版本为: 1.1.106
检查当前python版本为:3.6.8,目前版本只支持3.6以上

当前配置:


开启cdn查询
本次待筛选cdn总数为1857, 筛选时间大约为5-10min
cookie获取中
cookie获取完成
需要验证码
下载验证码...
下载验证码成功
Unable to open file (unable to open file: name = 'D:\12306-master\model.v2.0.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
None
验证码校验失败
需要验证码
下载验证码...
下载验证码成功

@juzj
Copy link

juzj commented Sep 11, 2019


求解

@tsingping
Copy link

There is a problem. After successful verification code identification, the login process prompts that the return parameter is empty and the interface status code is 302. Again and again. Anybody come across that?

验证码识别坐标为112,77,184,77
112,77,184,77
验证码通过,开始登录..
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
需要验证码
下载验证码...
下载验证码成功

@BayueVirtual
Copy link

BayueVirtual commented Jan 2, 2020 via email

@da-montagne
Copy link

你好,需要抢票的地址是否填写正确呢/或python运行环境编码设置是否正确?

------------------ 原始邮件  ------------------发件人:“ da -montagne“ notifications@github.com ;; 发送时间:  2020年1月1日(星期三)下午4:26收件人:“ testerSunshine / 12306” 12306@noreply.github.com ;; 抄送:“栖迟๓” 2252214290@qq.com ;;“评论” comment@noreply.github.com ;; 主题:  Re:[testerSunshine / 12306] IOError:[Errno 0]错误看此问题(#159)回溯(最近一次通话最近):select_ticket_info.select()。main()中第22行的文件“ run.py”,第128行中的“ /usr/local/git/12306/init/select_ticket_info.py”文件,在主from_station中,to_station = self.station_table(TickerConfig.FROM_STATION,TickerConfig.TO_STATION)文件“ /usr/local/git/12306/init/select_ticket_info.py”,第101行,在station_table中,from_station = station_name [from_station.encode(“ utf8“))AttributeError:“ tuple”对象没有属性“ encode”运行ython run.py r后已登录后,就报这个错误,请教下,这是什么问题。—您收到此评论是因为您发表了评论。直接回复此电子邮件,在GitHub上查看或取消订阅。

你好,我这边检查下.感谢哈.

@da-montagne
Copy link

1=>为一直随机ua,2->只启动的时候随机一次ua

RANDOM_AGENT = 2

PASSENGER_TICKER_STR = {
'一等座': 'M',
'特等座': 'P',
'二等座': 'O',
'商务座': 9,
'硬座': 1,
'无座': 1,
'软座': 2,
'软卧': 4,
'硬卧': 3,
}
请教下RANDOM_AGENT = 2 这个值可以写成"4", "3"吗

@BayueVirtual
Copy link

BayueVirtual commented Jan 3, 2020 via email

@da-montagne
Copy link

这个按照你的需求来了,每次启动时随机一个user-agent(浏览器版本,系统等各种信息) 就是设置每次请求时是否伪装成另一个浏览器 变量受参参数只能为 1 OR 2

------------------ 原始邮件 ------------------ 发件人: "da-montagne"<notifications@github.com>; 发送时间: 2020年1月2日(星期四) 晚上7:23 收件人: "testerSunshine/12306"<12306@noreply.github.com>; 抄送: "栖迟๓"<2252214290@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [testerSunshine/12306] IOError: [Errno 0] Error看此issues (#159) 1=>为一直随机ua,2->只启动的时候随机一次ua RANDOM_AGENT = 2 PASSENGER_TICKER_STR = { '一等座': 'M', '特等座': 'P', '二等座': 'O', '商务座': 9, '硬座': 1, '无座': 1, '软座': 2, '软卧': 4, '硬卧': 3, } 请教下RANDOM_AGENT = 2 这个值可以写成"4", "3"吗 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

了解,感谢哈.

@shihzenq
Copy link

shihzenq commented Jan 7, 2020

您好,我在本地安装了模型,我启动之后,一直报验证码校验失败。不知是什么原因。

@xingchan1981
Copy link

你好,是否可以告之,需要安装那些完整的软件及辅助软件,我安装 了python 3.7.1 Anaconda 3.7 VSCode 还是跑不起来,是我不会操作吗?

@ymmagic
Copy link

ymmagic commented Jan 8, 2020 via email

@liuchengjie01
Copy link

跑着跑着就报错了,
题目为['档案袋']
1 红酒
2 公交卡
3 红枣
4 鞭炮
5 档案袋
6 红酒
7 红酒
8 档案袋
验证码识别坐标为40,149,256,149
40,149,256,149
验证码通过,开始登录..
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "/usr/src/app/init/select_ticket_info.py", line 123, in main
self.call_login()
File "/usr/src/app/init/select_ticket_info.py", line 117, in call_login
self.login.go_login()
File "/usr/src/app/init/login.py", line 129, in go_login
uamtk = self.baseLogin(user, passwd)
File "/usr/src/app/init/login.py", line 66, in baseLogin
tresult = self.session.httpClint.send(logurl, loginData)
File "/usr/src/app/myUrllib/httpUtils.py", line 185, in send
response.content.decode() if isinstance(response.content, bytes) else response.content)
File "/usr/local/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

+1

@Sam1Liuu
Copy link

C:\Users\admin\Desktop\12306>python run.py r
Traceback (most recent call last):
File "run.py", line 21, in
from init import select_ticket_info
File "C:\Users\admin\Desktop\12306\init\select_ticket_info.py", line 16, in
from init.login import GoLogin
File "C:\Users\admin\Desktop\12306\init\login.py", line 8, in
from inter.GetRandCode import getRandCode
File "C:\Users\admin\Desktop\12306\inter\GetRandCode.py", line 6, in
from verify.localVerifyCode import Verify
File "C:\Users\admin\Desktop\12306\verify\localVerifyCode.py", line 7, in
import cv2
ModuleNotFoundError: No module named 'cv2'

大神看一下,什么情况

这个不是简单的pip一下就可以的

@Sam1Liuu
Copy link

pip 一下之后还是会出现这个问题

@BayueVirtual
Copy link

BayueVirtual commented Jan 10, 2020 via email

@BayueVirtual
Copy link

BayueVirtual commented Jan 10, 2020 via email

@BayueVirtual
Copy link

要安装3.6------------------ 原始邮件 ------------------ 发件人: "xingchan1981"notifications@github.com 发送时间: 2020年1月8日(星期三) 下午5:24 收件人: "testerSunshine/12306"12306@noreply.github.com; 抄送: "Ming Yuan"364362861@qq.com;"Comment"comment@noreply.github.com; 主题: Re: [testerSunshine/12306] IOError: [Errno 0] Error看此issues (#159) 你好,是否可以告之,需要安装那些完整的软件及辅助软件,我安装 了python 3.7.1 Anaconda 3.7 VSCode 还是跑不起来,是我不会操作吗? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Linux与Windows都可以新建虚拟环境,新建之后 用requirements.txt安装所需要的环境

@liuchengjie01
Copy link

你是不是用python 2的pip安装的cv2,但是跑的时候用的是python3

@Sam1Liuu
Copy link

Sam1Liuu commented Jan 10, 2020 via email

@Sam1Liuu
Copy link

源文件里 有requirements.txt 文件,环境以及包的版本都在里面,可以直接pip

------------------ 原始邮件 ------------------ 发件人: "18789005139"<notifications@github.com>; 发送时间: 2020年1月10日(星期五) 上午10:28 收件人: "testerSunshine/12306"<12306@noreply.github.com>; 抄送: "栖迟๓"<2252214290@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [testerSunshine/12306] IOError: [Errno 0] Error看此issues (#159) pip 一下之后还是会出现这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

我在deepin上运行docker-compose up --build -d 没有问题 ,docker ps 也看到程序在运行,然后再运行docker logs --follow ticket 看log时 在加入cdn时 最后会报错 以下是报错log :
Traceback (most recent call last):
  File "run.py", line 21, in <module>
    from init import select_ticket_info
  File "/usr/src/app/init/select_ticket_info.py", line 16, in <module>
    from init.login import GoLogin
  File "/usr/src/app/init/login.py", line 8, in <module>
    from inter.GetRandCode import getRandCode
  File "/usr/src/app/inter/GetRandCode.py", line 6, in <module>
    from verify.localVerifyCode import Verify
  File "/usr/src/app/verify/localVerifyCode.py", line 7, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

@BeenLi
Copy link

BeenLi commented Jan 13, 2020

"车次坐席查询为空,ip网络异常,查询url: https://kyfw.12306.cn/....可以手动查询是否有票",网络没问题总是出现ip网络异常,难道是我ip被封了?

我也遇到同样的情况,请问你解决了吗?

@shuanzhe
Copy link

我的是win7的系统,为什么始终一直在报错呢,这个程序是否可以打包成exe的程序该多好
错误代码:

E:\12306-master>run.py r
Traceback (most recent call last):
File "E:\12306-master\run.py", line 21, in
from init import select_ticket_info
File "E:\12306-master\init\select_ticket_info.py", line 11, in
from agency.cdn_utils import CDNProxy, open_cdn_file
File "E:\12306-master\agency\cdn_utils.py", line 10, in
from myUrllib.httpUtils import HTTPClient
File "E:\12306-master\myUrllib\httpUtils.py", line 8, in
from fake_useragent import UserAgent
ModuleNotFoundError: No module named 'fake_useragent'

E:\12306-master>python run.py c
Traceback (most recent call last):
File "run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 10, in
from myUrllib.httpUtils import HTTPClient
File "E:\12306-master\myUrllib\httpUtils.py", line 8, in
from fake_useragent import UserAgent
ModuleNotFoundError: No module named 'fake_useragent'

E:\12306-master>python run.py c
Traceback (most recent call last):
File "run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 6, in
from config import urlConf
File "E:\12306-master\config\urlConf.py", line 3, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

E:\12306-master>run.py c
Traceback (most recent call last):
File "E:\12306-master\run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 6, in
from config import urlConf
File "E:\12306-master\config\urlConf.py", line 3, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

E:\12306-master>run.py r
Traceback (most recent call last):
File "E:\12306-master\run.py", line 21, in
from init import select_ticket_info
File "E:\12306-master\init\select_ticket_info.py", line 9, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

@lcj1998
Copy link

lcj1998 commented Sep 11, 2020

image

@snowdsl
Copy link

snowdsl commented Sep 23, 2020

想请问一下,好像一直登陆失败,下面报错NameError: name 'null' is not defined

Corrupt JPEG data: 13 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
题目为['苍蝇拍']
1 冰箱
2 雨靴
3 苍蝇拍
4 黑板
5 黑板
6 苍蝇拍
7 冰箱
8 电饭煲
验证码识别坐标为184,77,112,149
184,77,112,149
验证码通过,开始登录..
登录失败: 验证码校验失败!
尝试重新登陆
需要验证码
下载验证码...
下载验证码成功
无需加载模型model.v2.0.h5
题目为['锣']
1 锣
2 锣
3 锣
4 锣
5 锣
6 锣
7 锣
8 锣
验证码识别坐标为40,77,112,77,184,77,256,77,40,149,112,149,184,149,256,149
40,77,112,77,184,77,256,77,40,149,112,149,184,149,256,149
Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "/usr/local/12306/init/select_ticket_info.py", line 123, in main
self.call_login()
File "/usr/local/12306/init/select_ticket_info.py", line 117, in call_login
self.login.go_login()
File "/usr/local/12306/init/login.py", line 128, in go_login
if self.codeCheck():
File "/usr/local/12306/init/login.py", line 41, in codeCheck
fresult = eval(fresult.split("(")[1].split(")")[0])
File "", line 1, in
NameError: name 'null' is not defined

@wong71
Copy link

wong71 commented Sep 24, 2020

Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "D:\12306\init\select_ticket_info.py", line 121, in main
l.reqLiftTicketInit()
File "D:\12306\inter\LiftTicketInit.py", line 18, in reqLiftTicketInit
matchObj = re.search('var CLeftTicketUrl = '(.*)'', result, re.M|re.I);
File "F:\Python38\lib\re.py", line 199, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
这个是什么问题,请问还有群能加人吗

@BayueVirtual
Copy link

源文件里 有requirements.txt 文件,环境以及包的版本都在里面,可以直接pip

------------------ 原始邮件 ------------------ 发件人: "18789005139"<notifications@github.com>; 发送时间: 2020年1月10日(星期五) 上午10:28 收件人: "testerSunshine/12306"<12306@noreply.github.com>; 抄送: "栖迟๓"<2252214290@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [testerSunshine/12306] IOError: [Errno 0] Error看此issues (#159) pip 一下之后还是会出现这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

我在deepin上运行docker-compose up --build -d 没有问题 ,docker ps 也看到程序在运行,然后再运行docker logs --follow ticket 看log时 在加入cdn时 最后会报错 以下是报错log :
Traceback (most recent call last):
  File "run.py", line 21, in
    from init import select_ticket_info
  File "/usr/src/app/init/select_ticket_info.py", line 16, in
    from init.login import GoLogin
  File "/usr/src/app/init/login.py", line 8, in
    from inter.GetRandCode import getRandCode
  File "/usr/src/app/inter/GetRandCode.py", line 6, in
    from verify.localVerifyCode import Verify
  File "/usr/src/app/verify/localVerifyCode.py", line 7, in
    import cv2
ModuleNotFoundError: No module named 'cv2'

请安装OpenCV的Python版本,pip install OpenCV-python,或者修改一下打码类型尝试下

@BayueVirtual
Copy link

我的是win7的系统,为什么始终一直在报错呢,这个程序是否可以打包成exe的程序该多好
错误代码:

E:\12306-master>run.py r
Traceback (most recent call last):
File "E:\12306-master\run.py", line 21, in
from init import select_ticket_info
File "E:\12306-master\init\select_ticket_info.py", line 11, in
from agency.cdn_utils import CDNProxy, open_cdn_file
File "E:\12306-master\agency\cdn_utils.py", line 10, in
from myUrllib.httpUtils import HTTPClient
File "E:\12306-master\myUrllib\httpUtils.py", line 8, in
from fake_useragent import UserAgent
ModuleNotFoundError: No module named 'fake_useragent'

E:\12306-master>python run.py c
Traceback (most recent call last):
File "run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 10, in
from myUrllib.httpUtils import HTTPClient
File "E:\12306-master\myUrllib\httpUtils.py", line 8, in
from fake_useragent import UserAgent
ModuleNotFoundError: No module named 'fake_useragent'

E:\12306-master>python run.py c
Traceback (most recent call last):
File "run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 6, in
from config import urlConf
File "E:\12306-master\config\urlConf.py", line 3, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

E:\12306-master>run.py c
Traceback (most recent call last):
File "E:\12306-master\run.py", line 29, in
from agency.cdn_utils import filterCdn
File "E:\12306-master\agency\cdn_utils.py", line 6, in
from config import urlConf
File "E:\12306-master\config\urlConf.py", line 3, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

E:\12306-master>run.py r
Traceback (most recent call last):
File "E:\12306-master\run.py", line 21, in
from init import select_ticket_info
File "E:\12306-master\init\select_ticket_info.py", line 9, in
import TickerConfig
File "E:\12306-master\TickerConfig.py", line 93, in
"is_server_chan": Files,
NameError: name 'Files' is not defined

你这应该环境问题。。。

@BayueVirtual
Copy link

想请问一下,好像一直登陆失败,下面报错NameError: name 'null' is not defined

Corrupt JPEG data: 13 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
题目为['苍蝇拍']
1 冰箱
2 雨靴
3 苍蝇拍
4 黑板
5 黑板
6 苍蝇拍
7 冰箱
8 电饭煲
验证码识别坐标为184,77,112,149
184,77,112,149
验证码通过,开始登录..
登录失败: 验证码校验失败!
尝试重新登陆
需要验证码
下载验证码...
下载验证码成功
无需加载模型model.v2.0.h5
题目为['锣']
1 锣
2 锣
3 锣
4 锣
5 锣
6 锣
7 锣
8 锣
验证码识别坐标为40,77,112,77,184,77,256,77,40,149,112,149,184,149,256,149
40,77,112,77,184,77,256,77,40,149,112,149,184,149,256,149
Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "/usr/local/12306/init/select_ticket_info.py", line 123, in main
self.call_login()
File "/usr/local/12306/init/select_ticket_info.py", line 117, in call_login
self.login.go_login()
File "/usr/local/12306/init/login.py", line 128, in go_login
if self.codeCheck():
File "/usr/local/12306/init/login.py", line 41, in codeCheck
fresult = eval(fresult.split("(")[1].split(")")[0])
File "", line 1, in
NameError: name 'null' is not defined

应该是12306那边验证码又进行了更新

@gakkiismywife
Copy link

想请问一下,好像一直登陆失败,下面报错NameError:未定义名称“ null”

JPEG数据损坏:标记0xd9前未
加载模型model.v2.0.h5版本
为['苍蝇拍']
1冰箱
2雨靴
3苍蝇拍
4黑板
5黑板
6苍蝇拍
7冰箱
8电饭煲
验证码识别坐标为184,77,112,149
184,77,112,149
验证码通过,开始登录..
登录失败:验证码验证失败!尝试
重新登陆
需要验证码
下载验证码...
下载验证码成功
无需加载模型model.v2.0.h5
译文为['锣']
1锣
2锣
3锣
4锣
5锣
6锣
7锣
8锣
验证码识别坐标为40,77,112,77,184,77,256,77,40,149,112,149,184,149,256,149
40,77,112,77,184,77,256,77,40,149,112,149,149,184,149
追溯(最近一次通话最近):
select_ticket_info.select()。main()中
第22行的文件“ run.py”,

self中的第123行“ /usr/local/12306/init/select_ticket_info.py” .call_login()
文件“ /usr/local/12306/init/select_ticket_info.py”,行117,在call_login
self.login.go_login()
文件“ /usr/local/12306/init/login.py”,行128 ,在go_login中,
如果self.codeCheck():在codeCheck中,
文件“ /usr/local/12306/init/login.py”,第41行,
fresult = eval(fresult.split(“(”)[1] .split(“ )“)[0])
文件”“,
NameError的第1行:未定义名称'null'

应该是12306那边验证码又进行了更新

俺也一样

@teair
Copy link

teair commented Apr 23, 2021

你是不是用python 2的pip安装的cv2,但是跑的时候用的是python3

兄弟,你这个问题怎么解决的?
Uploading image.png…

@HuangZhiwei97
Copy link

Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "D:\12306\init\select_ticket_info.py", line 121, in main
l.reqLiftTicketInit()
File "D:\12306\inter\LiftTicketInit.py", line 18, in reqLiftTicketInit
matchObj = re.search('var CLeftTicketUrl = '(.*)'', result, re.M|re.I);
File "F:\Python38\lib\re.py", line 199, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
这个是什么问题,请问还有群能加人吗

@Sirzhang1991
Copy link

image

@RemSynch
Copy link

Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "D:\12306-master\12306-master\init\select_ticket_info.py", line 121, in main
l.reqLiftTicketInit()
File "D:\12306-master\12306-master\inter\LiftTicketInit.py", line 18, in reqLiftTicketInit
matchObj = re.search('var CLeftTicketUrl = '(.*)'', result, re.M|re.I);
File "C:\Users\27654\AppData\Local\Programs\Python\Python37\lib\re.py", line 183, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

同问,无法解决

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

No branches or pull requests