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

Errors while running code #22

Open
gautamb2222 opened this issue Aug 31, 2023 · 1 comment
Open

Errors while running code #22

gautamb2222 opened this issue Aug 31, 2023 · 1 comment

Comments

@gautamb2222
Copy link

nibabel.deprecator.ExpiredDeprecationError: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

  • deprecated from version: 3.0
  • Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
@gautamb2222
Copy link
Author

gautamb2222 commented Aug 31, 2023

I commented the bolded line below, which surpassed this error, which is not right but for the sake of running code, I did this and then faced another error
def deprecator(func: ty.Callable[P, T]) -> ty.Callable[P, T]:
@functools.wraps(func)
def deprecated_func(*args: P.args, **kwargs: P.kwargs) -> T:
# if until and self.is_bad_version(until):
# raise exception(message)

warnings.warn(message, warning, stacklevel=2)
return func(*args, **kwargs)

_Error:
File "/home/student/.local/lib/python3.10/site-packages/cv2/typing/init.py", line 69, in
NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]
_TypeError: 'numpy.DTypeMeta' object is not subscriptable

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

No branches or pull requests

1 participant