Coder Social home page Coder Social logo

Compatibility issue with WSL. about jd-coin HOT 7 CLOSED

caoz avatar caoz commented on August 19, 2024
Compatibility issue with WSL.

from jd-coin.

Comments (7)

CaoZ avatar CaoZ commented on August 19, 2024

It seems that you have both Python 2.7 and Python 3 installed and you are using pip from the Python 2.7 environment, you can try pip3 instead, that's the issue...

But it will not work on WSL unless you have a Desktop Environment...

And it works on Windows.

from jd-coin.

Explorare avatar Explorare commented on August 19, 2024

Worked like a charm. Thanks.

> python app/main.py
2017-10-26 09:45:30,229 root[config] INFO: 使用配置文件 "config.json".
2017-10-26 09:45:30,229 root[config] WARNING: 配置文件不存在, 使用默认配置文件 "config.default.json".
2017-10-26 09:45:30,235 root[config] INFO: 用户名/密码未找到, 自动登录功能将不可用.
2017-10-26 09:45:30,381 root[main] INFO: # 从文件加载 cookies 成功.
2017-10-26 09:45:30,381 jobs[daka] INFO: Job Start: 京东客户端钢镚打卡
2017-10-26 09:45:31,182 jobs[daka] INFO: 登录状态: True
2017-10-26 09:45:31,182 jobs[daka_app] INFO: 今日已打卡: True
2017-10-26 09:45:31,183 jobs[daka] INFO: Job End.
2017-10-26 09:45:31,183 jobs[daka] INFO: Job Start: 京东客户端签到领京豆
2017-10-26 09:45:31,514 jobs[daka] INFO: 登录状态: True
2017-10-26 09:45:31,761 jobs[bean_app] INFO: 今日已签到: True; 签到天数: 1; 现有京豆: 1122
2017-10-26 09:45:31,762 jobs[daka] INFO: Job End.
2017-10-26 09:45:31,762 jobs[daka] INFO: Job Start: 京东小金库现金红包
2017-10-26 09:45:31,828 jobs[daka] INFO: 登录状态: True
2017-10-26 09:45:31,887 jobs[red_packet] INFO: 领取结果: 本次活动已结束~
2017-10-26 09:45:31,888 jobs[daka] INFO: Job End.
2017-10-26 09:45:31,888 jobs[daka] INFO: Job Start: 京东会员页签到领京豆
2017-10-26 09:45:32,095 jobs[daka] INFO: 登录状态: True
2017-10-26 09:45:32,155 root[main] ERROR: # 任务运行出错: KeyError('extUserInfo',)
Traceback (most recent call last):
  File "app/main.py", line 23, in main
    job.run()
  File "C:\Users\Explorare\Documents\GitHub\JD-Coin\app\job\daka.py", line 40, in run
    if self.is_signed():
  File "C:\Users\Explorare\Documents\GitHub\JD-Coin\app\job\bean.py", line 22, in is_signed
    ext_user_info = response['result']['extUserInfo']
KeyError: 'extUserInfo'
2017-10-26 09:45:32,160 jobs[daka] INFO: Job Start: 京东金融签到领奖励
2017-10-26 09:45:32,406 jobs[daka] INFO: 登录状态: True
2017-10-26 09:45:32,635 jobs[bean_jr] INFO: 今日已签到: True; 签到天数: 1; 现有钢镚: 0.08
2017-10-26 09:45:32,635 jobs[daka] INFO: Job End.
=================================
= 任务数: 5; 失败数: 2
= 失败的任务: ['京东小金库现金红包', '京东会员页签到领京豆']
=================================

from jd-coin.

CaoZ avatar CaoZ commented on August 19, 2024

Glad you like it ~~

I noticed that there's one task failed with Exception(KeyError: 'extUserInfo'), I've never encountered this issue before... maybe it's an accident...

from jd-coin.

Explorare avatar Explorare commented on August 19, 2024

The error still happens when the script is executed again.

> python main.py
2017-10-26 11:05:01,121 root[config] INFO: 使用配置文件 "config.json".
2017-10-26 11:05:01,258 root[main] INFO: # 从文件加载 cookies 成功.
2017-10-26 11:05:01,259 jobs[daka] INFO: Job Start: 京东客户端钢镚打卡
2017-10-26 11:05:02,085 jobs[daka] INFO: 登录状态: True
2017-10-26 11:05:02,085 jobs[daka_app] INFO: 今日已打卡: True
2017-10-26 11:05:02,086 jobs[daka] INFO: Job End.
2017-10-26 11:05:02,086 jobs[daka] INFO: Job Start: 京东客户端签到领京豆
2017-10-26 11:05:02,502 jobs[daka] INFO: 登录状态: True
2017-10-26 11:05:02,799 jobs[bean_app] INFO: 今日已签到: True; 签到天数: 1; 现有京豆: 1122
2017-10-26 11:05:02,799 jobs[daka] INFO: Job End.
2017-10-26 11:05:02,800 jobs[daka] INFO: Job Start: 京东小金库现金红包
2017-10-26 11:05:02,859 jobs[daka] INFO: 登录状态: True
2017-10-26 11:05:02,921 jobs[red_packet] INFO: 领取结果: 本次活动已结束~
2017-10-26 11:05:02,922 jobs[daka] INFO: Job End.
2017-10-26 11:05:02,923 jobs[daka] INFO: Job Start: 京东会员页签到领京豆
2017-10-26 11:05:03,394 jobs[daka] INFO: 登录状态: False
2017-10-26 11:05:03,395 jobs[daka] INFO: 进行登录...
2017-10-26 11:05:24,708 jobs[daka] INFO: 登录成功
2017-10-26 11:05:24,776 root[main] ERROR: # 任务运行出错: KeyError('extUserInfo',)
Traceback (most recent call last):
  File "main.py", line 23, in main
    job.run()
  File "C:\Users\Explorare\Documents\GitHub\JD-Coin\app\job\daka.py", line 40, in run
    if self.is_signed():
  File "C:\Users\Explorare\Documents\GitHub\JD-Coin\app\job\bean.py", line 22, in is_signed
    ext_user_info = response['result']['extUserInfo']
KeyError: 'extUserInfo'
2017-10-26 11:05:24,781 jobs[daka] INFO: Job Start: 京东金融签到领奖励
2017-10-26 11:05:29,558 jobs[daka] INFO: 登录状态: True
2017-10-26 11:05:29,617 jobs[bean_jr] INFO: 今日已签到: True; 签到天数: 1; 现有钢镚: 0.08
2017-10-26 11:05:29,618 jobs[daka] INFO: Job End.
=================================
= 任务数: 5; 失败数: 2
= 失败的任务: ['京东小金库现金红包', '京东会员页签到领京豆']
=================================

from jd-coin.

Explorare avatar Explorare commented on August 19, 2024

Is the issue related to this? 京东黑号的查询接口 - V2EX

from jd-coin.

CaoZ avatar CaoZ commented on August 19, 2024

I don't think it's related... I asked my friends tried and some of them also encountered this problem... No one told me this before... 😂

I guess if you have your QQ account bound, then this field will appear in your "https://vip.jd.com/member/getUserInfo.html" response, and I used the wrong way to detect user sign status before...

from jd-coin.

Explorare avatar Explorare commented on August 19, 2024

Yep. Both of my WeChat and QQ accounts are bound to this account.

from jd-coin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.