Skip to content

File > Download option defaults to .py for non-Python runtimes (R, Julia) #5792

@ayyucedemirbas

Description

@ayyucedemirbas

Describe the current behavior
When using a notebook configured with a non-Python runtime (R or Julia), the File > Download menu options do not adapt to the active kernel.

The menu continues to show "Download .py" as the only script export option. When selected, the file is downloaded with a .py extension. This requires the user to manually rename the file extension locally (e.g., from script.py to script.R) to use it properly in other IDEs.

Describe the expected behavior
The download menu should be context-aware based on the active Runtime type.

  • If the Runtime is R, the menu should display "Download .R" and save the file with a .R extension.
  • If the Runtime is Julia, the menu should display "Download .jl" and save the file with a .jl extension.

What web browser you are using
Chrome Version 143.0.7499.170 (Official Build) (arm64)

Additional context
Steps to reproduce the behavior:

  1. Open a new Google Colab notebook: https://colab.research.google.com/drive/1MwEd8VDmQ2ma7eO4mqeazMvdgk7Dz_-l?usp=sharing
  2. Go to Runtime > Change runtime type.
  3. Select R (or utilize a Julia kernel).
  4. Enter valid R code into a cell (e.g., print("Hello R")).
  5. Navigate to File > Download.
  6. Observe that the option remains "Download .py" and results in a Python file download.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions