Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 分析結果の配列要素数が0の場合エラーが発生する #15

Open
Dosugamea opened this issue Jul 18, 2022 · 0 comments
Assignees
Labels
[Priority] High 💨 This is MUST do [Topic] Bug 🐛 Something isn't working

Comments

@Dosugamea
Copy link
Member

概要 / Overview

譜面によってはフリック/スライド/タップノーツ等が存在しない場合があり
その際にエラーが発生して500が返される事象が発生している(推測)

現在の挙動 / Current Behavior:

ときおりエラーが発生して500が返される

起こるべき挙動 / Expected Behavior:

エラーを発生させずに正しく判定できるようにする

再現手順 / Steps To Reproduce:

  1. SUSファイルをアップロードする
  2. エラーログが出る

エラーログ / Error Log:

    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/main.py", line 40, in predict_difficulty
    data = analyzer.get_feature_values_from_sus(f.name)
  File "/app/analyzer.py", line 63, in get_feature_values_from_sus
    sld_diff_features = self.get_feature_values(sld_diff)
  File "/app/analyzer.py", line 16, in get_feature_values
    max_value = max(values)
ValueError: max() arg is an empty sequence

環境 / Environment:

  • OS: Ubuntu 20.04
  • Arch: arm64
  • Install: Docker Stack
@Dosugamea Dosugamea self-assigned this Jul 18, 2022
@Dosugamea Dosugamea added [Topic] Bug 🐛 Something isn't working [Priority] High 💨 This is MUST do labels Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] High 💨 This is MUST do [Topic] Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant