fkubota / Carrier-Owl

arxiv--> DeepL --> Slack/LINE
MIT License
327 stars 356 forks source link

Workflow が Run owl で失敗する #43

Closed uytrewq12345 closed 3 years ago

uytrewq12345 commented 3 years ago

Workflow がしばしば失敗します。 エラーメッセージと、メッセージから推測できる直接的な原因を以下に記載します。

■エラーメッセージ

Run poetry run python src/carrier-owl.py
  poetry run python src/carrier-owl.py
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.6/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.6/x64/lib
    SLACK_ID: ***
Traceback (most recent call last):
  File "src/carrier-owl.py", line 188, in <module>
    main()
  File "src/carrier-owl.py", line 183, in main
    results = serch_keywords(id_list, config['keywords'])
  File "src/carrier-owl.py", line 64, in serch_keywords
    title = bs.find('meta', attrs={'property': 'og:title'})['content']
TypeError: 'NoneType' object is not subscriptable

Error: Process completed with exit code 1.

■直接的な原因 src/carrier-owl.py の serch_keywords()関数にて、 bs.find('meta', attrs={'property': 'og:title'}) の戻り値がNoneになっている

fkubota commented 3 years ago

おそらく、年末年始で論文がpublishされていないことが原因だと考えられる。bsで無理やりウェブスクする仕様から、arxiv apiを使う仕様(v2.1.0以降)に変更するとこのバグは起きないと考えている。

uytrewq12345 commented 3 years ago

v2.1.0 のupdate により解決したため、Closeします。 ご対応ありがとうございました!