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

AttributeError: module 'pandas._typing' has no attribute 'FilePathOrBuffer' #3

Open
ChloeZhou1997 opened this issue Apr 16, 2022 · 1 comment

Comments

@ChloeZhou1997
Copy link

I am trying to view the image using the helper function provided, however, it seems I cannot import the dcmread_image function:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [1], in <cell line: 7>()
      4 import matplotlib.pyplot as plt
      5 import pandas as pd
----> 7 from helper import dcmread_image

File ~/ai_project/AI-IN-MEDICAL-MATERIALS/03-Data-Formats/helper.py:36, in <module>
     29     pixel_array = rescale_intensity(
     30         pixel_array, in_range=(low, high), out_range="dtype"
     31     )
     32     return pixel_array
     35 def read_boxes(
---> 36     boxes_fp: pd._typing.FilePathOrBuffer, filepaths_fp: pd._typing.FilePathOrBuffer
     37 ) -> pd.DataFrame:
     38     """Read pandas DataFrame with bounding boxes joined with file paths"""
     39     df_boxes = pd.read_csv(boxes_fp)

AttributeError: module 'pandas._typing' has no attribute 'FilePathOrBuffer'

here's the error message I received. anyone knows what I can do about it?

@mateuszbuda
Copy link
Collaborator

Maybe wrong pandas versions?

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

2 participants