Unable to load data

#1
by KashyapiNagaHarshitha - opened
Marilyne Labrie org

handle = open( Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/panel/io/handlers.py", line 389, in run
exec(self._code, module.dict)
File "/code/Quality_Control.py", line 207, in
print(combine_and_save_metadata_files(metadata_dir, selected_metadata_files))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/Quality_Control.py", line 185, in combine_and_save_metadata_files
df = pd.read_csv(file_path)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
return _read(filepath_or_buffer, kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 620, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1620, in init
self._engine = self._make_engine(f, self.engine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1880, in _make_engine
self.handles = get_handle(
^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/io/common.py", line 873, in get_handle
handle = open(
^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'wetransfer_data-zip_2024-05-17_1431/test_metadata/Slide_B_DD1s1.one_1.tif.csv'

Getting this issue while I am trying to load data although I have that folder.

image.png

code reference:
base_dir = "wetransfer_data-zip_2024-05-17_1431"
project_name="test"
metadata_dir = os.path.join(base_dir, project_name + "_metadata")
single_file_path = os.path.join(metadata_dir, selected_metadata_files[0])
single_file_df = pd.read_csv(single_file_path)

KashyapiNagaHarshitha changed discussion status to closed
KashyapiNagaHarshitha changed discussion status to open
Marilyne Labrie org

Setting up the base_dir with real path solved this issue.
Later faced permission denied issues which are further solved by setting chmod in the Dockerfile

KashyapiNagaHarshitha changed discussion status to closed

Sign up or log in to comment