Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace API removes extension from Python files #630

Open
fferegrino opened this issue Apr 25, 2023 · 2 comments
Open

Workspace API removes extension from Python files #630

fferegrino opened this issue Apr 25, 2023 · 2 comments

Comments

@fferegrino
Copy link

We are running into an issue when uploading Python files using the method import_workspace_dir in the WorkspaceApi class. However, these files are not treated as Python source files, but as Databricks notebooks.

The only reason I managed to pinpoint this issue is the fact that the API removes the extension and as such they are no longer interpreted as Python modules but as Databricks notebooks.

cur_dst = cur_dst[:-len(ext)]

Is this intended behaviour? could this be changed by not removing the file extension, unless the file is actually a Databricks notebook?

@fferegrino
Copy link
Author

Actually, the issue is not only with the extension but with the file format, according to the docs it is possible to upload arbitrary files (?) when the format is set to "AUTO", so that probably needs changing as well...

Now, it seems that the feature is in public preview, and as such this change has not made it to the CLI, rendering this and #618 a bit redundant.

@osuleiman
Copy link

I've just created a PR to help tackle this problem.

#643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants