Giter VIP home page Giter VIP logo

autoliterature's Introduction

autoliterature's People

Contributors

wilmerwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autoliterature's Issues

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.')

你好,我按步骤配置了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.')

INFO:Sci-Hub:Failed to fetch pdf with identifier 10.1038/s41598-021-92475-7 (resolved url None) due to request exception.

感谢您分享的脚本!

目前我这里配置了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笔记:
bug
publisherpdf处将会显示Please manually add the attachment link

请问这可能是什么原因导致的呢?(尝试了另外4个DOI号,也出现了同样的问题。)

感谢解答,祝好!

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 23: invalid start byte

作者您好 非常感谢分享这个脚本以及持续更新!

在之前版本中 根据 #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

'utf-8' codec can't decode byte 0x80 in position 3131: 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

保存文献pdf的文件夹保存位置,以及无法替换md文档内容的问题

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'

FileNotFoundError: [Errno 2] No such file or directory: 'note.md'

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

请问我该怎么解决呢?谢谢

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.