Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Robustness to incorrect types; numpy.int64 cannot be converted

オープン
#115 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
mysql, numpy, python
領域
databases

調査の方向性

ispyb/connector/mysqlsp/main.py と traceback に示された call_sp_write のパスから始め、引数がどのように cursor.callproc に渡されるかを調べます。numpy.int64 の値で失敗を再現し、意図された結果が問題のある引数の特定なのか、報告されるエラーの改善なのかを判断します。完了条件は issue に指定されていません。

索引モデルが issue の本文から書いたものです。

説明

Spent some time tracking down an annoying calling error:

Traceback (most recent call last):
File "i24ssx_Chip_Collect_py3v1.py", line 293, in create_dcid
    dcid = conn.mx_acquisition.upsert_data_collection(list(dc_params.values()))
File ".../site-packages/ispyb/sp/acquisition.py", line 166, in upsert_data_collection
    return self.get_connection().call_sp_write("upsert_dc", values)
File ".../site-packages/ispyb/connector/mysqlsp/main.py", line 88, in call_sp_write
    result_args = cursor.callproc(procname=procname, args=args)
File ".../site-packages/mysql/connector/cursor_cext.py", line 466, in callproc
    "Failed calling stored routine; {0}".format(err))
mysql.connector.errors.InterfaceError: Failed calling stored routine; Python type numpy.int64 cannot be converted

Calling API had provided a numpy.int64 instead of an int. This looks like an int in __str__ and __repr__ so took an annoyingly long time to track down. I wonder if it'd be possible to tell which value caused this error, at least.

主要言語
Python
スター
7
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DiamondLightSource/ispyb-api のほかの issue

DiamondLightSource/ispyb-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。