qianbinbin / dict2anki Goto Github PK
View Code? Open in Web Editor NEW将单词批量转换为 Anki 卡片
License: MIT License
将单词批量转换为 Anki 卡片
License: MIT License
环境一 : window10, python3.8(conda)
使用命令pip3 install dict2anki
安装失败
ERROR: Command errored out with exit status 1:
command: 'D:\4.Software\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\timeC\\AppData\\Local\\Temp\\pip-install-55halzdz\\dict2anki\\setup.py'"'"'; __file__='"'"'C:\\Users\\timeC\\AppData\\Local\\Temp\\pip-install-55halzdz\\dict2anki\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\timeC\AppData\Local\Temp\pip-pip-egg-info-rekeia70'
cwd: C:\Users\timeC\AppData\Local\Temp\pip-install-55halzdz\dict2anki\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\timeC\AppData\Local\Temp\pip-install-55halzdz\dict2anki\setup.py", line 4, in <module>
long_description = f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 4: illegal multibyte sequence
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
网站能够访问
通过clone下载后, 使用python -m dict2anki -i /path/to/vocabulary.txt
得到 :
I/cli : no extractor specified, using default: cambridge
I/extractor : generating front template
I/extractor : generated front template to: .\cambridge\front_template.txt
I/extractor : generating back template
I/extractor : generated back template to: .\cambridge\back_template.txt
I/cambridge : retrieving styling
W/net : urlopen error: Remote end closed connection without response
W/net : urlopen error: Remote end closed connection without response
W/net : urlopen error: Remote end closed connection without response
W/net : urlopen error: Remote end closed connection without response
W/net : urlopen error: Remote end closed connection without response
Traceback (most recent call last):
File "D:\4.Software\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\4.Software\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\__main__.py", line 4, in <module>
main()
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\cli.py", line 88, in main
e.generate_styling()
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\extractors\cambridge.py", line 54, in generate_styling
self._styling = self._retrieve_styling()
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\extractors\cambridge.py", line 59, in _retrieve_styling
style = url_get_content(URL_STYLE)
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 59, in url_get_content
response = url if isinstance(url, HTTPResponse) else urlopen_with_retry(url, headers, retry, **kwargs)
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 51, in urlopen_with_retry
raise e
File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 43, in urlopen_with_retry
return urlopen(url, **kwargs)
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "D:\4.Software\anaconda3\lib\urllib\request.py", line 1354, in do_open
r = h.getresponse()
File "D:\4.Software\anaconda3\lib\http\client.py", line 1332, in getresponse
response.begin()
File "D:\4.Software\anaconda3\lib\http\client.py", line 303, in begin
version, status, reason = self._read_status()
File "D:\4.Software\anaconda3\lib\http\client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
环境二 : Centos7.6 安装成功
使用命令dict2anki -i /path/to/vocabulary.txt
, 失败日志同上
望解惑, 谢谢
为避免占用内存,应尽快写入文件,不能一下子把所有任务全丢进协程。
考虑协程方案:
改为居中或加边距
如abortion abound accelerate account telecom
如abject
如
adhere to -> adhere to sth
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.