Pentaho

 View Only

 Troubleshooting 'No such file or directory' Error for Network Paths in Pentaho Server Job Execution

Lucas Abrantes's profile image
Lucas Abrantes posted 03-13-2024 15:51

I'm facing an issue with a Pentaho Server job that executes a Python script (Automacao_latromi_relatoriobi_inbound_V4.py). The job fails with a "No such file or directory" error when attempting to access an Excel file located on a network drive. This problem occurs only when the job is executed on the Pentaho Server; the script runs successfully on my local machine and directly within PDI Spoon.

I've tried various ways to specify the directory paths to ensure they're correct and accessible, but the problem persists exclusively in the Pentaho Server environment.

Error Log:

2024-02-22 11:33:34,339 INFO [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - (stdout) importando dados 2024-02-22 11:33:34,339 ERROR [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - ERROR : (stderr) File "D:\KN_BI_MASTER\Pentaho_pipelines_e_scripts\1. Latromi\1. Check in Inbound\1. Scripts\Automacao_latromi_relatoriobi_inbound_V4.py", line 150, in <module> 2024-02-22 11:33:34,339 INFO [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - (stdout) Falha na tentativa 1: [Errno 2] No such file or directory: 'H:\\POWER_BI.sao\\Bases_Shein\\Latromi/Relatório Janelas e Apontamentos - YMS Shein.xlsx'

Path Variations Tried:

  • r'H:\POWER_BI.sao\Bases_Shein\Latromi\Relatório Janelas e Apontamentos - YMS Shein.xlsx'
  • 'H:\POWER_BI.sao\Bases_Shein\Latromi\Relatório Janelas e Apontamentos - YMS Shein.xlsx'
  • 'H:/POWER_BI.sao/Bases_Shein/Latromi/Relatório Janelas e Apontamentos - YMS Shein.xlsx'
  • 'H://POWER_BI.sao//Bases_Shein//Latromi//Relatório Janelas e Apontamentos - YMS Shein.xlsx'
  • r'H://POWER_BI.sao//Bases_Shein//Latromi//Relatório Janelas e Apontamentos - YMS Shein.xlsx'

Despite these variations, the error persists when the job is run on the Pentaho Server.

Troubleshooting Steps Taken:

  1. Confirmed the network path and file accessibility; the file is accessible from my machine, and the path is correct.
  2. Successfully ran the script on my local machine and through PDI Spoon.
  3. Checked network permissions; the Pentaho Server should have access to the network drive.

I suspect the issue might relate to how Pentaho Server handles network paths or permissions, but I'm unsure how to proceed to resolve this. Has anyone encountered a similar issue or can provide guidance on troubleshooting this further in the Pentaho Server environment?

Any insights or suggestions would be greatly appreciated.

Thank you.