wilmerwang / autoliterature Goto Github PK
View Code? Open in Web Editor NEWautoLiterature是一个基于Python的自动文献管理命令行工具
autoLiterature是一个基于Python的自动文献管理命令行工具
你好,我按步骤配置了dropbox,但是依旧收到权限错误
dropbox.exceptions.BadInputError: BadInputError('xxxxxxxxx', 'Error in call to API function "files/upload": Your app is not permitted to access this endpoint because it does not have the required scope 'files.content.write'. The owner of the app can enable the scope for the app using the Permissions tab on the App Console.')
macos big sur11.5.1,权限应该都开了,等等再看下
感谢您分享的脚本!
目前我这里配置了proxychains4,经proxychains4 wget https://www.google.com
测试,显示connected
,linux终端的代理应该已经设置好了。
在使用命令proxychains4 python main.py -p * -k * -t 1
开始该脚本之后:
在.md笔记中输入- [10.1038/s41598-021-92475-7]
,得到如下结果:
1.终端:
[proxychains] Strict chain ... 127.0.0.1:1080 ... api.crossref.org:80 ... OK
INFO:Sci-Hub:Failed to fetch pdf with identifier 10.1038/s41598-021-92475-7 (resolved url None) due to request exception.
2.md笔记:
在publisher
和pdf
处将会显示Please manually add the attachment link
请问这可能是什么原因导致的呢?(尝试了另外4个DOI号,也出现了同样的问题。)
感谢解答,祝好!
作者您好 非常感谢分享这个脚本以及持续更新!
在之前版本中 根据 #1 更改文件路径之后可以正常运行。
最新更新的版本运行之后出现了以上错误。以下为报错信息:
Traceback (most recent call last):
File "/Users/-/Dropbox/autoLiterature/scr/autoliterature.py", line 72, in <module>
main()
File "/Users/-/Dropbox/autoLiterature/scr/autoliterature.py", line 38, in main
modified_items = folder_moniter.file_md5_update()
File "/Users/-/Dropbox/autoLiterature/scr/modules.py", line 52, in file_md5_update
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
File "/Users/-/opt/anaconda3/envs/autoliter/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 23: invalid start byte
Traceback (most recent call last):
File "/Users/-/Dropbox/autoLiterature/scr/autoimage.py", line 68, in <module>
main()
File "/Users/-/Dropbox/autoLiterature/scr/autoimage.py", line 37, in main
modified_items = folder_moniter.file_md5_update()
File "/Users/-/Dropbox/autoLiterature/scr/modules.py", line 52, in file_md5_update
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
File "/Users/-/opt/anaconda3/envs/autoliter/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 23: invalid start byte
请问运行python main.py之后报错是为什么呢,之前已经成功运行过了(虽然运行了之后不会自动替换文献的信息)
Traceback (most recent call last): File "/Users/gaolegao/Applications/autoLiterature/scr/autoliterature.py", line 95, in <module> main() File "/Users/gaolegao/Applications/autoLiterature/scr/autoliterature.py", line 38, in main modified_items = folder_moniter.file_md5_update() File "/Users/gaolegao/Applications/autoLiterature/scr/modules.py", line 52, in file_md5_update md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest() File "/opt/anaconda3/envs/autoliter/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte Traceback (most recent call last): File "/Users/gaolegao/Applications/autoLiterature/scr/autoimage.py", line 71, in <module> main() File "/Users/gaolegao/Applications/autoLiterature/scr/autoimage.py", line 37, in main modified_items = folder_moniter.file_md5_update() File "/Users/gaolegao/Applications/autoLiterature/scr/modules.py", line 52, in file_md5_update md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest() File "/opt/anaconda3/envs/autoliter/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte
requests.get(url)[‘message’].json 信息之后,通过key来获取bib信息.但是有些key虽然存在却没有value数值.
比如,正常情况下通过json[‘short-joural’]获取一个list,然后通过index=0获取journal name,但是有时候获取的list是空,就会报错触法异常处理.前端就无法获的bib信息
请问大佬,使用模块 这个第二步 给的代码 是要写入txt文件然后另存为bat后缀保存到存放文献笔记的文件夹吗
Traceback (most recent call last):
File "/Users/lichen/Documents/autoLiterature/scr/autoliterature.py", line 95, in
main()
File "/Users/lichen/Documents/autoLiterature/scr/autoliterature.py", line 38, in main
modified_items = folder_moniter.file_md5_update()
File "/Users/lichen/Documents/autoLiterature/scr/modules.py", line 52, in file_md5_update
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
IsADirectoryError: [Errno 21] Is a directory: '/Users/lichen/Dropbox/Apps/PaparsUpdate/pdf'
Traceback (most recent call last):
File "/Users/lichen/Documents/autoLiterature/scr/autoimage.py", line 71, in
main()
File "/Users/lichen/Documents/autoLiterature/scr/autoimage.py", line 37, in main
modified_items = folder_moniter.file_md5_update()
File "/Users/lichen/Documents/autoLiterature/scr/modules.py", line 52, in file_md5_update
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
IsADirectoryError: [Errno 21] Is a directory: '/Users/lichen/Dropbox/Apps/PaparsUpdate/pdf'
Hello~ 非常感谢你写了这个程序
我在note文件夹下新建了note.md,但使用时会出现No such file or directory: 'note.md'
Traceback (most recent call last):
File "E:\autoLiterature-main\scr\autoimage.py", line 75, in <module>
modified_files, file_md5 = folder_moniter(moniter_files)
File "E:\autoLiterature-main\scr\autoimage.py", line 41, in folder_moniter
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
FileNotFoundError: [Errno 2] No such file or directory: '..\\note\\note.md'
Traceback (most recent call last):
File "E:\autoLiterature-main\scr\autoliterature.py", line 82, in <module>
modified_files, file_md5 = folder_moniter(moniter_files)
File "E:\autoLiterature-main\scr\autoliterature.py", line 44, in folder_moniter
md5_now = hashlib.md5(open(file_path).read().encode('utf-8')).hexdigest()
FileNotFoundError: [Errno 2] No such file or directory: 'note.md'
我修改了file_path为绝对路径:
file_path = os.path.join(os.getcwd(),'note',file_path)
但会报错:
RuntimeError: dictionary changed size during iteration
报错的全文如下:
E:\autoLiterature-main\note\note.md
Traceback (most recent call last):
File "E:\autoLiterature-main\scr\autoimage.py", line 75, in <module>
modified_files, file_md5 = folder_moniter(moniter_files)
File "E:\autoLiterature-main\scr\autoimage.py", line 36, in folder_moniter
for file_path, md5_before in file_md5.items():
RuntimeError: dictionary changed size during iteration
Traceback (most recent call last):
File "E:\autoLiterature-main\scr\autoliterature.py", line 83, in <module>
modified_files, file_md5 = folder_moniter(moniter_files)
File "E:\autoLiterature-main\scr\autoliterature.py", line 43, in folder_moniter
for file_path, md5_before in file_md5.items():
RuntimeError: dictionary changed size during iteration
请问我该怎么解决呢?谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.