Comments (27)
膜拜大神。同样是64bit win10 + python3.74 64位,未安装anaconda,报同样的错误
from jdbrandmember.
anaconda至于这个我不记得了,好像没有装,但不知道pycharm有没有带这个,明天白天再看一下,有情况再来反馈
from jdbrandmember.
系统是win10 64位
from jdbrandmember.
C:\Windows\system32>pip install urllib3
Collecting urllib3
Using cached urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Installing collected packages: urllib3
Successfully installed urllib3-1.26.4
C:\Windows\system32>pip install selenium
Collecting selenium
Using cached selenium-3.141.0-py2.py3-none-any.whl (904 kB)
Requirement already satisfied: urllib3 in c:\users\yang\appdata\local\programs\python\python39-32\lib\site-packages (from selenium) (1.26.4)
Installing collected packages: selenium
Successfully installed selenium-3.141.0
C:\Windows\system32>
C:\Windows\system32>C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\python.exe C:\Users\Yang\Desktop\JDBrandMember-main\main.py
日志已生成,查看./logs/ Some log data is being generated: ./log/ ...正在关闭,不要退出
C:\Windows\system32>
from jdbrandmember.
你是否安装过anaconda
请查看一下你的环境变量,是否存在两个python
环境,如果有的话,请保留 anaconda
那个环境
from jdbrandmember.
在控制台运行
ftype Python.File
看返回的是什么
膜拜大神。同样是64bit win10 + python3.74 64位,未安装anaconda,报同样的错误
from jdbrandmember.
ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
清楚为什么报错了吗?
from jdbrandmember.
ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
清楚为什么报错了吗?
😭不知道
from jdbrandmember.
ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
清楚为什么报错了吗?
😭 不知道
网上有说是因为32位造成的这个错误OSError: [WinError 193] %1 不是有效的 Win32 应用程序
from jdbrandmember.
ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
清楚为什么报错了吗?😭不知道
网上有说是因为32位造成的这个错误OSError: [WinError 193] %1 不是有效的 Win32 应用程序
不清楚,但 @lanyucomputer 已经用64 、32位测试过了都不行。我只记得我以前office
的快捷方式也出现过%1
的错误问题,是因为%1
在windows中代表的是目标文件。以前装过python
或selenium
包但没有卸载干净的可能会导致注册表出现问题。
但应该不是脚本的问题。。。。
参考OSError: [WinError 193] %1 is not a valid Win32 application
可能需要将lib/python3.8/subprocess.py
Popen.__init__
的 735 行的shell=False
改成shell=True
虽然这个方法很不好
from jdbrandmember.
额为何评论被标记为垃圾邮件
from jdbrandmember.
我也是这个问题,只能用打包版了,手动更新店铺信息
from jdbrandmember.
ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
清楚为什么报错了吗?
😭 不知道网上有说是因为32位造成的这个错误OSError: [WinError 193] %1 不是有效的 Win32 应用程序
不清楚,但 @lanyucomputer 已经用64 、32位测试过了都不行。我只记得我以前
office
的快捷方式也出现过%1
的错误问题,是因为%1
在windows中代表的是目标文件。以前装过python
或selenium
包但没有卸载干净的可能会导致注册表出现问题。但应该不是脚本的问题。。。。
参考OSError: [WinError 193] %1 is not a valid Win32 application
可能需要将
lib/python3.8/subprocess.py
Popen.__init__
的 735 行的shell=False
改成shell=True
虽然这个方法很不好
shell改成了True,确实没有这个OSError,但好是跑不下去。
2021-05-22 15:56:05 INFO 结束运行 Traceback (most recent call last):
File "D:\Program Files\JDBrandMember-main\main.py", line 90, in get_browser
options=options)
File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 98, in start
self.assert_process_still_running()
File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service D:\Program Files\JDBrandMember-main\drivers/chromedriver unexpectedly exited. Status code was: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Program Files\JDBrandMember-main\main.py", line 391, in
main()
File "D:\Program Files\JDBrandMember-main\main.py", line 343, in main
check_user()
File "D:\Program Files\JDBrandMember-main\main.py", line 303, in check_user
_browser = get_browser()
File "D:\Program Files\JDBrandMember-main\main.py", line 94, in get_browser
raise WebDriverException
selenium.common.exceptions.WebDriverException: Message: None
from jdbrandmember.
Microsoft Windows [版本 10.0.19041.264]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Windows\system32>ftype Python.File
Python.File="C:\Windows\py.exe" "%L" %*
C:\Windows\system32>
from jdbrandmember.
也是没有装别的,我是百度在CNDS看到很多这个错误提示,但是没有和这个一样的,至于你说的配置文件里面没有填是留空的,如果填上chrome的路径的话,就会报另外一种错 2021-05-22 20:33:53 ”ERROR CONFIG错误 请重新打开程序“
from jdbrandmember.
{
"thread": 6,
"binary": "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
"headless": true,
"useUser": 0,
"threshold": 0,
"is_get_voucher": true,
"users": []
}
from jdbrandmember.
配置文件是这样填的,不知道对不对
如果填了路径就报 ERROR CONFIG错误 请重新打开程序
from jdbrandmember.
C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\python.exe C:/Users/Yang/Desktop/JDBrandMember-main/main.py
Traceback (most recent call last):
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 355, in
config = json.load(open(get_file_path("config.json"), "r"))
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json_init_.py", line 346, in loads
return default_decoder.decode(s)
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 3 column 18 (char 36)
Traceback (most recent call last):
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 355, in
config = json.load(open(get_file_path("config.json"), "r"))
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json_init.py", line 293, in load
return loads(fp.read(),
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 3 column 18 (char 36)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 359, in
os.remove(get_file_path("config.json"))
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:/Users/Yang/Desktop/JDBrandMember-main\config.json'
Process finished with exit code 1
用PYcharm运行是这样的结果,日志LOG里面是 2021-05-22 20:33:53 ERROR CONFIG错误 请重新打开程序
from jdbrandmember.
其实是没有程序在使用config.json这个文件,重启电脑再直接运行也是一样的提示,所以来这样找大神了
from jdbrandmember.
Microsoft Windows [版本 10.0.19041.264]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Windows\system32>pip uninstall anaconda
WARNING: Skipping anaconda as it is not installed.
C:\Windows\system32>
提示没有装所谓的anaconda
from jdbrandmember.
报错,就是不弹出来登陆界面
from jdbrandmember.
报错,就是不弹出来登陆界面
应该是selenium
本身的问题
不过你可以有两种解决方法:
- 使用
python
虚拟环境 - 使用打包好的,打包使用的是
pyinstaller
和直接运行无异
from jdbrandmember.
2021-05-23 13:49:40 INFO 结束运行 Traceback (most recent call last):
File "selenium\webdriver\common\service.py", line 72, in start
File "subprocess.py", line 951, in init
File "subprocess.py", line 1420, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\jd\main.py", line 89, in get_browser
return webdriver.Chrome(executable_path=get_file_path("drivers/chromedriver"), desired_capabilities={},
File "selenium\webdriver\chrome\webdriver.py", line 73, in init
File "selenium\webdriver\common\service.py", line 81, in start
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\jd\main.py", line 391, in
main()
File "C:\jd\main.py", line 341, in main
add_cookie()
File "C:\jd\main.py", line 102, in add_cookie
browser = get_browser(False)
File "C:\jd\main.py", line 94, in get_browser
raise WebDriverException
selenium.common.exceptions.WebDriverException: Message: None
使用打包好的也是这样的
from jdbrandmember.
github.com/curtinlv/JD-Script这个库可以运行,也可以刷豆,效果不错,就是不知道能不能天天刷
from jdbrandmember.
我知道是为什么会报错了,现在告诉大家,以避免大家和我一样走弯路,我是用了github.com/curtinlv/JD-Script这个脚本受了启发,发现这个getJDCookie.py脚本要一个EXE的文件chromedriver.exe,其实这个文件 库主“AntonVanke”文件里面就自带一个,但是是没有后缀名exe的,我就自作聪明的把库主自带的文件大小为16331KB的文件名改成 了chromedriver.exe,再试运行还是不行不弹出登陆界面,后来到https://npm.taobao.org/mirrors/chromedriver/90.0.4430.24/下载chromedriver_win32.zip 解压后替换库主原来的chromedriver,把扩展名去掉,再次运行就可以弹出登陆界面了,至此问题解决了,还有一个疑问就是我下载的那个文件的版本和我电脑的chrome浏览器的版本是不一致的,我是看到库主AntonVanke说自带的文件只适用于版本 90.0.4430.212,刚好我的就是这个版本就没有下载替换,导致弯了一大圈,现在的疑问是版本不一致也可以弹出登陆,真是奇怪,不过问题解决了,感谢库主一直耐心的解答,谢谢大家
from jdbrandmember.
验证账号1中,中途退出可能会误认为账号失效而删除
如果需要退出,请 ctrl + c 输入 3 退出,否则可能本次运行的结果不会保存
用户列表 用户名 京豆数量 是否在执行列表
1 jd_18888888888888 3944 1
选择
- 开始执行
- 添加账号
- 退出
1
当前账号:jd_18888888888888
正在执行:0.48925%[->****************************************]状态:在10215768号店铺获得2京豆豆
如果需要退出,请 ctrl + c 输入 3 退出,否则可能本次运行的结果不会保存
用户列表 用户名 京豆数量 是否在执行列表
1 jd_18888888888888 3944 1
选择
- 开始执行
- 添加账号
- 退出
3
日志已生成,查看./logs/ Some log data is being generated: ./log/ ...正在关闭,不要退出
from jdbrandmember.
我知道是为什么会报错了,现在告诉大家,以避免大家和我一样走弯路,我是用了github.com/curtinlv/JD-Script这个脚本受了启发,发现这个getJDCookie.py脚本要一个EXE的文件chromedriver.exe,其实这个文件 库主“AntonVanke”文件里面就自带一个,但是是没有后缀名exe的,我就自作聪明的把库主自带的文件大小为16331KB的文件名改成 了chromedriver.exe,再试运行还是不行不弹出登陆界面,后来到https://npm.taobao.org/mirrors/chromedriver/90.0.4430.24/下载chromedriver_win32.zip 解压后替换库主原来的chromedriver,把扩展名去掉,再次运行就可以弹出登陆界面了,至此问题解决了,还有一个疑问就是我下载的那个文件的版本和我电脑的chrome浏览器的版本是不一致的,我是看到库主AntonVanke说自带的文件只适用于版本 90.0.4430.212,刚好我的就是这个版本就没有下载替换,导致弯了一大圈,现在的疑问是版本不一致也可以弹出登陆,真是奇怪,不过问题解决了,感谢库主一直耐心的解答,谢谢大家
十分感谢,原来是没有下载对应驱动导致的
我误以为你已经下载好对应的驱动了。
内置的驱动是我开发环境所用的驱动,可能会造成误解。
from jdbrandmember.
Related Issues (20)
- 一个提醒和一个问题 HOT 1
- UnicodeDecodeError: 出现编码错误'gbk' codec can't decode byte …… HOT 1
- 这个脚本是不是太猛了点。。。。 HOT 2
- 新版本点那个main.exe闪退啊 HOT 6
- 程式運行時有顯示獲取京豆,但實際沒有增加 HOT 2
- 5.31号更新还是打开闪退
- 进程异常卡住 HOT 18
- config.yaml设置京豆阈值后闪退,无法正常遍历所有店铺 HOT 6
- 增加开卡速度config HOT 1
- No module named 'yaml',提示找不到这个模块 HOT 2
- 什么时候更新shopId呢 HOT 1
- PYYAML5.4.1已经装过,运行main.py的时候还是报错缺少yaml包 HOT 1
- 注释哪些行可以跑本地的两万多个店铺 HOT 1
- 尝试多个店铺,但是都没有获取到京东,是黑号了吗 HOT 3
- cookie 失效 HOT 1
- 京豆值,没有变化 HOT 1
- 配置binary参数后,ChromeDriver报错
- 换了俩号都是0,现在是不能用了吗? HOT 8
- 11 HOT 1
- 获取线上 shopid 失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jdbrandmember.