cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

FileNotFoundError when running dbx execute

dslin
New Contributor III

Hi,

I'm very new to databricks, this might be a basic question.

I can't find a way to run my local python file with databricks successfully. When I run the following `execute` command, I got a FileNotFoundError.

`dbx execute --cluster-id=*** --job=Sample-Training-Job-File -e test --no-rebuild --no-package`

`FileNotFoundError: File notebooks/training_file.py is mentioned in the task or job definition, but is non-existent`

Here is my job definition in `deployment.yml`

```

environments:

test:

strict_path_adjustment_policy: true

jobs:

- name: "Sample-Training-Job-File"

new_cluster:

spark_version: "10.4.x-scala2.12"

num_workers: 1

node_type_id: "Standard_DS3_v2"

spark_python_task:

python_file: "file://notebooks/training_file.py"

```

Thanks in advance for any tips and ideas.

4 REPLIES 4

Debayan
Esteemed Contributor III
Esteemed Contributor III

Hi, If you are using dbx , could you please make sure if all the requirements are fulfilled? https://docs.databricks.com/dev-tools/dbx.html#requirements. Also, where are you running the yml for the same?

Vidula
Honored Contributor

Hi @Di Lin​ 

Does @Debayan Mukherjee​  response answer your question? If yes, would you be happy to mark it as best so that other members can find the solution more quickly?

We'd love to hear from you.

Thanks!

dslin
New Contributor III
Hi Vidula,
Sure. This has been resolved now.

Vidula
Honored Contributor

Hi @Di Lin​ 

Thanks for the quick response.

Regards

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.