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

Misleading error message #881

Closed
Jiaqi-Lv opened this issue Nov 5, 2024 · 0 comments · Fixed by #883
Closed

Misleading error message #881

Jiaqi-Lv opened this issue Nov 5, 2024 · 0 comments · Fixed by #883

Comments

@Jiaqi-Lv
Copy link
Contributor

Jiaqi-Lv commented Nov 5, 2024

  • TIA Toolbox version: latest
  • Python version: 3.11
  • Operating System: Ubuntu

Description

The error message from get_patch_extractor is misleading, when location_list is of invalid type.

What I Did

img = np.zeros((256,256,3))
coords = [[10,10]]
extractor = get_patch_extractor(
    'point',
    input_img = img,
    locations_list = coords,
    patch_size=38
)
TypeError: Please input correct image path or an ndarray image.

The problem is not the image, it's the locations list:

img = np.zeros((256,256,3))
coords = [[10,10]]
extractor = get_patch_extractor(
    'point',
    input_img = img,
    locations_list = np.array(coords),
    patch_size=38
)

This works fine.

@Jiaqi-Lv Jiaqi-Lv linked a pull request Nov 22, 2024 that will close this issue
shaneahmed pushed a commit that referenced this issue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant