kajweb / wqxuetang_downloader

文泉学堂、悦读下载器 | 2020-02-16网站不再公益开放阅读,项目失效。
MIT License
219 stars 119 forks source link

我这报错 #2

Closed ImwangXM closed 4 years ago

ImwangXM commented 4 years ago

Traceback (most recent call last): File "main.py", line 20, in book.start( *(int(x) for x in sys.argv[2:]) ); File "C:\Users\petswir\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 139, in start url = self.getPageUrl( page ); File "C:\Users\petswir\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 100, in getPageUrl getKparmas = self.generateKparmas( page ); File "C:\Users\petswir\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 116, in generateKparmas jwt_enc = jwt.encode( jwt_data, jwt_key, algorithm='HS256'); AttributeError: module 'jwt' has no attribute 'encode'

BillXuce commented 4 years ago

你的jwt的包有问题,建议用作者提供的版本

ImwangXM commented 4 years ago

你的jwt的包有问题,建议用作者提供的版本

你好,用低版本的jwt吗?我是直接pip装上的,现在卸载了,提示这个错误 Traceback (most recent call last): File "main.py", line 5, in from wqxtDownloader import *; File "C:\Users\petswir\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 8, in import jwt ModuleNotFoundError: No module named 'jwt'

BillXuce commented 4 years ago

建议你直接使用pip install -r requirements.txt

ImwangXM commented 4 years ago

requirements.txt这里面的都 already satisfied了,作者怎么还不现身,我要炸了

BillXuce commented 4 years ago

我在使用native环境的时候也会出现这样的问题,在conda环境中使用这个问题就会消失了,你可以试试在conda中配置环境并运行,直接在powershell中进行pip经常会发生这种找不到模块的情况,我也挺迷的

kajweb commented 4 years ago

JWT是用PyJWT的,两个import一样…… pip install pyjwt

ImwangXM commented 4 years ago

没接触过python,可以了,谢谢两位大佬