Robustness to incorrect types; numpy.int64 cannot be converted
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with ispyb/connector/mysqlsp/main.py and the call_sp_write path shown in the traceback, then inspect how arguments reach cursor.callproc. Reproduce the failure with a numpy.int64 value and determine whether the intended outcome is identifying the offending argument or improving the reported error; done criteria are not specified in the issue.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 7
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/ispyb-api
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
DiamondLightSource/ispyb-api#223 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
DiamondLightSource/ispyb-api#179 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
DiamondLightSource/ispyb-api#171 · 1 comment ·
-
Add tests for new EM particle picker callsMay be free again @HorstmannA claimed this 1959 days ago, and no pull request is open. Open
DiamondLightSource/ispyb-api#151 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
DiamondLightSource/ispyb-api#113 ·
All issues in DiamondLightSource/ispyb-api
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")Possibly taken @mayureshsonawane17 claimed this today. OpenWaiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Add .devin pluginOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ayghri/i-have-adhd#249 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelscope/FunASR#3762 ·
Maintainers usually reply within 1 day