'Apache Airflow how i can read the Excel file from the remote directory

I am running Apache Airflow in the remote Desktop PC that has linux OS from that pc I have to access the excel file that is located in the share drive but I am unable to access or read the excel file and I get the error, could someone help me out please.

my code is following,

import pandas as pd
import numpy as np
import xlrd
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta

default_args = {
    'start_date': datetime(2022, 1, 24),
    "depends_on_past": False,
}


filePath = "/mnt/mainfolder/subfolder/file_folder/Excel_file.xlsx")

def read_Excel(**context):

    import_excel = pd.read_excel(filePath).fillna('')

    return import_excel 

with DAG(dag_id='test_path',
         description='Dag to play with XComs',
         schedule_interval=None,
         default_args=default_args,
         catchup=False) as dag:

    Read_Excel_import = PythonOperator(
        task_id="Read_Excel_import ",
        python_callable=read_Excel
    )

    Read_Excel_import 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source