Prabakar
Databricks Employee
Databricks Employee

Hi @Bertrand BURCKER​ I tried your code and ended up with a different error. To create a directory you can try the below code and it will help create the folder for you.

import requests
from pyspark.sql.types import (StructField, StringType, StructType, IntegerType)
API_URL = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiUrl().getOrElse(None)
TOKEN = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().getOrElse(None)
 
response = requests.post(
  API_URL + '/api/2.0/workspace/mkdirs', 
  headers={"Authorization": "Bearer " + TOKEN},
  json={"path": "/Users/prabakarxxxxxxxx/Test_dir1/"}
 )