testerSunshine / 12306

12306智能刷票,订票

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOError: [Errno 0] Error看此issues

walker4753 opened this issue · comments

下单接口: 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

commented

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

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

下单接口: 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

commented

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

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

济南西-南京南 车次坐席查询为空,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, 可以手动查询是否有票,请问这个错是什么引起的??

正在第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, 可以手动查询是否有票

同问

commented

我修改了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: 温馨提示: 用户名或者密码为空,请仔细检查

commented

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

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

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'

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

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 求解~!!

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
求解

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

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

老是提示验证码校验失败

检查当前版本为: 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
验证码校验失败
需要验证码
下载验证码...
下载验证码成功


求解

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
需要验证码
下载验证码...
下载验证码成功


求解

You can try reinstalling the chromedriver. There is the link for installation:https://www.cnblogs.com/lfri/p/10542797.html

image
大神帮忙看看,谢谢

image
求解,

image
大神帮忙看看,谢谢

你要下载Chromedriver 放到这个目录里面,然后再修改路径

老是提示验证码校验失败

检查当前版本为: 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
验证码校验失败
需要验证码
下载验证码...
下载验证码成功

我开始也是这个错误, 后来换了个tensorflow版本就解决这个error了

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
求解

你需要下载chromedriver,然后修改配置文件目录

url: /otn/leftTicket/queryA?leftTicketDTO.train_date=&leftTicketDTO.from_station=SHH&leftTicketDTO.to_station=KFF&purpose_codes=ADULT返回参数为空, 接口状态码: 302
上海-开封 车次坐席查询为空,查询url: https://kyfw.12306.cn/otn/leftTicket/queryA?leftTicketDTO.train_date=&leftTicketDTO.from_station=SHH&leftTicketDTO.to_stationdes=ADULT, 可以手动查询是否有票

打开链接,显示网络错误,这是我的ip被封了么?

图片
求解,

我也是此问题 不知解决了没

commented

图片
求解,

我也是此问题 不知解决了没

添加配置了chromedriver我的就好了

是的是的 我下载了chromedrive 更改配置文件之后就可以了 感谢


cookie获取中
Traceback (most recent call last):
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 20, in
run()
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 8, in run
select_ticket_info.select().main()
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\init\select_ticket_info.py", line 155, in main
getDrvicesID(self)
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\config\getCookie.py", line 17, in getDrvicesID
driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in init
self.service.start()
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 997, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect

用win10跟的时候报这个错了,看了代码,是这个方法报的错,麻烦解答一下,谢谢
try:
cmd = [self.path]
cmd.extend(self.command_line_args())
self.process = subprocess.Popen(cmd, env=self.env,
close_fds=platform.system() != 'Windows',
stdout=self.log_file,
stderr=self.log_file,
stdin=PIPE)

commented

cookie获取中
Traceback (most recent call last):
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 20, in
run()
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 8, in run
select_ticket_info.select().main()
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\init\select_ticket_info.py", line 155, in main
getDrvicesID(self)
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\config\getCookie.py", line 17, in getDrvicesID
driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in init
self.service.start()
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 997, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect

用win10跟的时候报这个错了,看了代码,是这个方法报的错,麻烦解答一下,谢谢
try:
cmd = [self.path]
cmd.extend(self.command_line_args())
self.process = subprocess.Popen(cmd, env=self.env,
close_fds=platform.system() != 'Windows',
stdout=self.log_file,
stderr=self.log_file,
stdin=PIPE)

也是没配置chromedriver 的问题吧

cookie获取中
Traceback (most recent call last):
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 20, in
run()
File "E:/pyWorkSpaces/PycharmProjects/GouPiao/run.py", line 8, in run
select_ticket_info.select().main()
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\init\select_ticket_info.py", line 155, in main
getDrvicesID(self)
File "E:\pyWorkSpaces\PycharmProjects\GouPiao\config\getCookie.py", line 17, in getDrvicesID
driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in init
self.service.start()
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "E:\softToolsInstallPath\PythonJDK\Python36-64\lib\subprocess.py", line 997, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect
用win10跟的时候报这个错了,看了代码,是这个方法报的错,麻烦解答一下,谢谢
try:
cmd = [self.path]
cmd.extend(self.command_line_args())
self.process = subprocess.Popen(cmd, env=self.env,
close_fds=platform.system() != 'Windows',
stdout=self.log_file,
stderr=self.log_file,
stdin=PIPE)

也是没配置chromedriver 的问题吧

我的电脑装了Chrome浏览器了,还有装driver吗?

commented

Chrome

看TickerConfig.py里的注释

如果COOKIE_TYPE=1,则需配置chromeDriver路径,下载地址http://chromedriver.storage.googleapis.com/index.html

chromedriver配置版本只要和chrome的大版本匹配就行

cookie获取完成
需要验证码
下载验证码...
下载验证码成功
None
验证码校验失败
需要验证码
下载验证码...
下载验证码成功
0
None
验证码校验失败
需要验证码
下载验证码...
下载验证码成功

验证码校验失败
url: /otn/login/conf返回参数为空, 接口状态码: 302
需要验证码
下载验证码...
下载验证码成功

验证码一直较验失败是什么原因?没有报其它的

验证码校验失败
url: /otn/login/conf返回参数为空, 接口状态码: 302
需要验证码
下载验证码...
下载验证码成功

老是提示验证码校验失败
检查当前版本为: 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
验证码校验失败
需要验证码
下载验证码...
下载验证码成功

我开始也是这个错误, 后来换了个tensorflow版本就解决这个error了

你是换成什么版本了?

'DeprecationWrapper' object is not callable
None
验证码校验失败
需要验证码
下载验证码...

换了tensorflow版本后变成这样的错误了

url: /otn/leftTicket/queryA?leftTicketDTO.train_date=&leftTicketDTO.from_station=SHH&leftTicketDTO.to_station=KFF&purpose_codes=ADULT返回参数为空, 接口状态码: 302
上海-开封 车次坐席查询为空,查询url: https://kyfw.12306.cn/otn/leftTicket/queryA?leftTicketDTO.train_date=&leftTicketDTO.from_station=SHH&leftTicketDTO.to_stationdes=ADULT, 可以手动查询是否有票

打开链接,显示网络错误,这是我的ip被封了么?

同问,请问解决了吗

Successfully built bs4 PyYAML wrapcache ntplib sklearn fake-useragent termcolor gast wrapt absl-py
tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you'll have setuptools 40.6.3 which is incompatible.
Installing collected packages: beautifulsoup4, bs4, PyYAML, six, urllib3, idna, requests, wrapcache, ntplib, sklearn, opencv-python, keras-preprocessing, keras-applications, keras, protobuf, termcolor, grpcio, gast, google-pasta, wrapt, astor, absl-py, markdown, tensorboard, tensorflow-estimator, tensorflow, selenium, fake-useragent
Found existing installation: beautifulsoup4 4.6.3
Uninstalling beautifulsoup4-4.6.3:
Successfully uninstalled beautifulsoup4-4.6.3
Found existing installation: PyYAML 3.13
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

请问这个PyYAML没有安装。会有影响吗?

Successfully built bs4 PyYAML wrapcache ntplib sklearn fake-useragent termcolor gast wrapt absl-py
tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you'll have setuptools 40.6.3 which is incompatible.
Installing collected packages: beautifulsoup4, bs4, PyYAML, six, urllib3, idna, requests, wrapcache, ntplib, sklearn, opencv-python, keras-preprocessing, keras-applications, keras, protobuf, termcolor, grpcio, gast, google-pasta, wrapt, astor, absl-py, markdown, tensorboard, tensorflow-estimator, tensorflow, selenium, fake-useragent
Found existing installation: beautifulsoup4 4.6.3
Uninstalling beautifulsoup4-4.6.3:
Successfully uninstalled beautifulsoup4-4.6.3
Found existing installation: PyYAML 3.13
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

请问这个PyYAML没有安装。会有影响吗?

处理咯。thk!!!

请问这是什么错误??? mac os

下载验证码成功
Corrupt JPEG data: 13 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
'_thread._local' object has no attribute 'value'
None
验证码校验失败
需要验证码
下载验证码...
下载验证码成功
Corrupt JPEG data: 14 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
'_thread._local' object has no attribute 'value'
None
验证码校验失败
需要验证码
下载验证码...
下载验证码成功
Corrupt JPEG data: 13 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
'_thread.local' object has no attribute 'value'
None
正在第326次查询 随机停留时长:4.38 乘车日期: 2019-10-01 车次:G355,G263,G27,G323 下单无票 无候补机会 耗时:240.213ms
url: /passport/captcha/captcha-check?callback=jQuery19108016482864806321_1554298927290&answer=None&rand=sjrand&login_site=E&
=1569760071262返回参数为空, 接口状态码: 302
验证码校验失败
需要验证码
下载验证码...
下载验证码成功
Corrupt JPEG data: 12 extraneous bytes before marker 0xd9
无需加载模型model.v2.0.h5
'_thread._local' object has no attribute 'value'
None
验证码校验失败

是的是的我下载了chromedrive更改配置文件之后就可以了感谢

请问你配置了什么文件?是环境变量吗?

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
求解
我也遇到了这个问题!请问你这个问题解决了吗?怎么解决的?

commented
/usr/local/lib/python3.6/site-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.
12306ticket |   warnings.warn('No training configuration found in save file: '
12306ticket | Traceback (most recent call last):
12306ticket |   File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
12306ticket |     stdin=PIPE)
12306ticket |   File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
12306ticket |     restore_signals, start_new_session)
12306ticket |   File "/usr/local/lib/python3.6/subprocess.py", line 1364, in _execute_child
12306ticket |     raise child_exception_type(errno_num, err_msg, err_filename)
12306ticket | FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/code/12306/chormedriver': '/usr/local/code/12306/chormedriver'
12306ticket |
12306ticket | During handling of the above exception, another exception occurred:
12306ticket |
12306ticket | Traceback (most recent call last):
12306ticket |   File "run.py", line 20, in <module>
12306ticket |     run()
12306ticket |   File "run.py", line 8, in run
12306ticket |     select_ticket_info.select().main()
12306ticket |   File "/usr/src/app/init/select_ticket_info.py", line 155, in main
12306ticket |     getDrvicesID(self)
12306ticket |   File "/usr/src/app/config/getCookie.py", line 17, in getDrvicesID
12306ticket |     driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH)
12306ticket |   File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
12306ticket |     self.service.start()
12306ticket |   File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 83, in start
12306ticket |     os.path.basename(self.path), self.start_error_message)
12306ticket | selenium.common.exceptions.WebDriverException: Message: 'chormedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

在CentOS的下载地址添加了chormeDriver的地址,docker启动找不到这个文件啊

QQ图片20191016124216
12306登录成功,再抢票过程中出现上图情况,请问老大正解应该如何操作?

commented

/otn/leftTicket/query?leftTicketDTO.train_date=2019-11-2&leftTicketDTO.from_station=SZQ&leftTicketDTO.to_station=XAY&purpose_codes=ADULT返回参数为空, 接口状态码: 302

是什么情况


cookie获取中
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p
ackages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subpro
cess.py", line 769, in init
restore_signals, start_new_session)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subpro
cess.py", line 1172, in _execute_child
startupinfo)
PermissionError: [WinError 5] 拒绝访问。

During handling of the above exception, another exception occurred:

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 "F:\BaiduNetdiskDownload\12306-master\init\select_ticket_info.py", line 1
56, in main
getDrvicesID(self)
File "F:\BaiduNetdiskDownload\12306-master\config\getCookie.py", line 17, in g
etDrvicesID
driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p
ackages\selenium\webdriver\chrome\webdriver.py", line 68, in init
self.service.start()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p
ackages\selenium\webdriver\common\service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'BaiduNetdiskDownload' e
xecutable may have wrong permissions. Please see https://sites.google.com/a/chro
mium.org/chromedriver/home

大佬们 求解

url: /otn/leftTicket/query?leftTicketDTO.train_date=2020-1-10&leftTicketDTO.from_station=GZQ&leftTicketDTO.to_station=WHN&purpose_codes=ADULT返回参数为空, 接口状态码: 302
广州-武汉 车次坐席查询为空,查询url: https://kyfw.12306.cn/otn/leftTicket/query?leftTicketDTO.train_date=2020-1-10&leftTicketDTO.from_station=GZQ&leftTicketDTO.to_station=WHN&purpose_codes=ADULT, 可以手动查询是否有票

这是什么问题呀????返回参数为空??

这是我的ip被封了么?
我的也是这样的,兄弟,你的解决了吗?

commented

url: /otn/leftTicket/query?leftTicketDTO.train_date=2020-1-10&leftTicketDTO.from_station=GZQ&leftTicketDTO.to_station=WHN&purpose_codes=ADULT返回参数为空, 接口状态码: 302
广州-武汉 车次坐席查询为空,查询url: https://kyfw.12306.cn/otn/leftTicket/query?leftTicketDTO.train_date=2020-1-10&leftTicketDTO.from_station=GZQ&leftTicketDTO.to_station=WHN&purpose_codes=ADULT, 可以手动查询是否有票

这是什么问题呀????返回参数为空??

我也是这样,手动在网页查询是有票的,是API接口变了吗?

安装依赖的时候报错~
image

commented

在使用新版本Dockerfile37的时候发现报错:
image
错误描述如下:
Reading package lists...
Building dependency tree...
Reading state information...
Package fonts-liberation is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package xdg-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

commented

大神,帮忙看看,这是怎么回事?我更新了tensorflow,需要验证码
下载验证码...
验证码获取失败
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302

跑着跑着就报错了,
题目为['档案袋']
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)

image
大神看一下

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'

大神看一下,什么情况

图片
求解,

我也是此问题 不知解决了没

添加配置了chromedriver我的就好了

windows添加配置CHROME_PATH = "D:\DevInstall\chromedriver.exe"
配置了之后还是报错,有大神看下么?

DevTools listening on ws://127.0.0.1:12540/devtools/browser/d3209c2a-545f-4138-95fb-708104b552e9
Traceback (most recent call last):
File "run.py", line 26, in
select_ticket_info.select().main()
File "D:\DevInstall\12306-master3\init\select_ticket_info.py", line 122, in main
getDrvicesID(self)
File "D:\DevInstall\12306-master3\config\getCookie.py", line 28, in getDrvicesID
driver.get("https://www.12306.cn/index/index.html")
File "D:\DevInstall\python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 324, in get
self.execute(Command.GET, {'url': url})
File "D:\DevInstall\python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "D:\DevInstall\python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"DB283FEB276336BC5D1F246050E04E55","isDefault":true,"type":"default"},"id":1,"name":"","origin":"://"}
(Session info: chrome=79.0.3945.88)
(Driver info: chromedriver=2.7.236900,platform=Windows NT 6.3 x86_64)

好吧 已解决 是chromedriver小版本问题,换了个小版本大于它的就ok了

大神,帮忙看看,这是怎么回事?我更新了tensorflow,需要验证码
下载验证码...
验证码获取失败
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302
url: /otn/login/conf返回参数为空, 接口状态码: 302

你设置一下[COOKIE_TYPE],继续设置一下本地chromedriver
COOKIE_TYPE = 1
CHROME_PATH = "C:/Users/Ligo/AppData/Local/Google/Chrome/Application/chromedriver"

empty range for randrange() (4,1, -3)
empty range for randrange() (4,1, -3)
empty range for randrange() (4,1, -3)
忽然一直这种,怎么弄?

url: /passport/web/login返回参数为空, 接口状态码: 302
这种错误如何解决?

url: /passport/web/login返回参数为空, 接口状态码: 302
这种错误如何解决?

作者代码注释中写道:使用网页端/otn/HttpZF/logdevice获取devicesId,这个接口的算法目前可能有点问题,如果登录一直302的请改为配置1
个人猜测:302重定向一直无法获取到正确的窗口,需要修改为本地配置的selenium.webdriver来进行模拟操控

url: /passport/web/login返回参数为空, 接口状态码: 302
这种错误如何解决?

解决办法为:设置 COOKIE_TYPECHROME_PATH

ex:
COOKIE_TYPE = 1
CHROME_PATH = "C:/Users/Ligo/AppData/Local/Google/Chrome/Application/chromedriver"

你好&nbsp; 完整情况复述一下哈

------------------&nbsp;原始邮件&nbsp; ------------------发件人:“ zhouxufeng “ notifications@github.com ;; 发送时间:&nbsp; 2019年12月26日(星期四)晚上7:12收件人:“ testerSunshine / 12306” 12306@noreply.github.com ;; 抄送:“栖迟๓” 2252214290@qq.com ;;“评论” comment@noreply.github.com ;; 主题:&nbsp; Re:[testerSunshine / 12306] IOError:[Errno 0]错误随后发出(#159)randrange()(4,1,-3)的空范围randrange()(4,1, -3)randrange()(4,1,-3)的空范围忽然一直这种,怎么弄?—您收到此内容是因为您评论了。直接回复此电子邮件,在GitHub上查看或取消订阅。

   这个我也没办法复述完整情况,我用的python3.6.8,然后程序是一直挂windows后台跑的,每次早上来看到就会有这样的情况,因为晚上我也是持续挂着的,日志太多覆盖掉了。
    这个原因是跑一段时间以后出现的。不知道是不是跟晚上休眠那块有关系(我猜的)。

Traceback (most recent call last):
File "run.py", line 22, in
select_ticket_info.select().main()
File "/usr/local/git/12306/init/select_ticket_info.py", line 128, in main
from_station, to_station = self.station_table(TickerConfig.FROM_STATION, TickerConfig.TO_STATION)
File "/usr/local/git/12306/init/select_ticket_info.py", line 101, in station_table
from_station = station_name[from_station.encode("utf8")]
AttributeError: 'tuple' object has no attribute 'encode'
运行ython run.py r后已登录后,就报这个错误,请教下,这是什么问题.

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

------------------&nbsp;原始邮件&nbsp; ------------------发件人:“ da -montagne“ notifications@github.com ;; 发送时间:&nbsp; 2020年1月1日(星期三)下午4:26收件人:“ testerSunshine / 12306” 12306@noreply.github.com ;; 抄送:“栖迟๓” 2252214290@qq.com ;;“评论” comment@noreply.github.com ;; 主题:&nbsp; 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上查看或取消订阅。

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

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

RANDOM_AGENT = 2

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

这个按照你的需求来了,每次启动时随机一个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.

了解,感谢哈.

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

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

跑着跑着就报错了,
题目为['档案袋']
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

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一下就可以的

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

要安装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安装所需要的环境

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

源文件里 有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'

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

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

我的是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

想请问一下,好像一直登陆失败,下面报错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

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
这个是什么问题,请问还有群能加人吗

源文件里 有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,或者修改一下打码类型尝试下

我的是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

你这应该环境问题。。。

想请问一下,好像一直登陆失败,下面报错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那边验证码又进行了更新