-1

I am attempting to get a value from a h5 dataset using h5py with the dict-like indexing. I tested the code and it works, but pylance shows me this error in vscode.

The error "Expect expression" and "Zero-length tuple is not allowed in this context" are marked by the red underline in the picture below.

_artemis_file here is the h5 file. And the code snippet below is in a method.

EDIT: the method self.calc_points() returns a list.

enter image description here

2
  • Please read the formatting help and show code as text, not an image. Please also read minimal reproducible example and try to show code that others can use to demonstrate the problem for themselves. Commented Oct 20, 2023 at 1:04
  • Can you provide code to reproduces the problem? This can help us solve your problem effectively. Commented Oct 20, 2023 at 1:38

1 Answer 1

0

looks like it was an error with how I added the type hint for the _artemis_file instance variable above.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Austin Benny, glad to know you've found the solution to resolve this issue! you could click '✔' to mark it as an answer to change its status to Answered. It will also help others to solve a similar issue. See also can I answer my own question.., Just a reminder :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.