download: failed at yukicoder No.649
See original GitHub issueお疲れさまです。 以下のバージョン,環境でNo.649 ここでちょっとQK!のダウンロードが失敗しました。 他の問題では正常にダウンロードできました。
version: online-judge-tools 0.1.55 環境: Windows10, WSL ubuntu18.04 エラーメッセージ:
kaito@PC:~/procon/procon/yukicoder/183/d$ oj dl https://yukicoder.me/problems/no/649
[x] problem recognized: <onlinejudge.service.yukicoder.YukicoderProblem object at 0x7f3e9ab14eb8>: https://yukicoder.me/problems/no/649
[x] load cookie from: /home/kaito/.local/share/online-judge-tools/cookie.jar
[x] GET: https://yukicoder.me/problems/no/649
[x] 200 OK
Traceback (most recent call last):
File "/home/kaito/.local/bin/oj", line 7, in <module>
onlinejudge.implementation.main.main(args=sys.argv[1:])
File "/home/kaito/.local/lib/python3.6/site-packages/onlinejudge/implementation/main.py", line 318, in main
run_program(namespace, parser=parser)
File "/home/kaito/.local/lib/python3.6/site-packages/onlinejudge/implementation/main.py", line 287, in run_program
download(args)
File "/home/kaito/.local/lib/python3.6/site-packages/onlinejudge/implementation/command/download.py", line 53, in download
samples = problem.download_sample_cases(session=sess) # type: ignore
File "/home/kaito/.local/lib/python3.6/site-packages/onlinejudge/service/yukicoder.py", line 275, in download_sample_cases
it = self._parse_sample_tag(pre)
File "/home/kaito/.local/lib/python3.6/site-packages/onlinejudge/service/yukicoder.py", line 312, in _parse_sample_tag
if prv.name == 'h6' and tag.parent.name == 'div' and tag.parent['class'] == ['paragraph'] and pprv.name == 'h5':
AttributeError: 'NoneType' object has no attribute 'name'
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Fix file download errors - Google Chrome Help
If you try to download a file and it doesn't work, first try to fix the error with these troubleshooting steps: Make sure...
Read more >The license download failed because I do not have a write ...
The message "License downloading failed. You do not have the write access on the Licenses folder." occurs when the OS does not allow...
Read more >Netflix says 'You have downloads on too many devices ...
This error on your iPhone, iPad, or iPod touch means you've reached the maximum number of download devices your Netflix plan allows. To...
Read more >"couldn't be downloaded" error when you download a file or a ...
Fixes an issue in which you receive an error message when you download a file or a program in Internet Explorer 11.
Read more >Download failed. There are no HTTP transports available ...
When I try to install theme on wamp server it shows a line as below Download failed. There are no HTTP transports available...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@kmyk ありがとうございます。チャレンジさせてください。 No.649では入力説明欄のpreタグが3つあり、後ろの二つはdivに入って入れ子になっているため、
previous_siblingがただの文章"タイプ1のクエリの場合:"を指して、結果そのタグがNoneになりprvがNoneになっていると思われます。 (入れ子になったpreタグ)ここで相談なのですが、util.pyの
util.previous_sibling_tagを変更して例外処理を入れて、previous_siblingがNoneを返す代わりに<div></div>を返すようにするのはどうでしょうか。yukicoder以外にも、Noneが出た時に困ると思い、util.pyの変更を提案しています。utilに変更を入れるのは大きな範囲に影響が及ぶためプルリク前に相談しました。
#361 で解決したので閉じます。 @tMasaaa ありがとうございました