Notebook Paths Errors in Community Edition

mban-mondo
New Contributor II

I have the following Notebook in Databricks UI:
 

dbutils.entry_point.getDbutils().notebook().getContext().toJson()
notebook_path = dbutils.notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()
print(f"Current notebook path: {notebook_path}")
#Now I try to list notebook files
%ls /Users/mar@email.com/path_test
%ls /Users/mar@email.com
/

I get this answer:
Current noteb
ook path: /Users/mar@email.com/path_test
ls: cannot access '/Users/mar@email.com/': No such file or directory
ls: cannot access '/Users/mar@email.com/path_test': No such file or directory
-------------

Mondo Technologies GmbH
6300 Zug, Switzerland

szymon_dybczak
Esteemed Contributor III

Hi @mban-mondo ,

I think this is related to permissions issue. The same code will work if you create your own workspace. Since databricks community it's not your own instace, they probably had to disable some "features".

View solution in original post

mban-mondo
New Contributor II

Many thanks. It would be helpful if the error message said 'No access has been granted to this resource' instead of 'Resource not found.    🙂

-------------

Mondo Technologies GmbH
6300 Zug, Switzerland