os_path is not defined
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
A clear and concise description of what the bug is.
os_path is not defined in rename_file function (line 579).
**To Reproduce**
Steps to reproduce the behavior:
1. Go to 'File tab'
2. Click on 'Rename'
3. Scroll down to '....'
4. See error : os_path is not defined .(PFA)
**Expected behavior**
A clear and concise description of what you expected to happen.
File should be renamed
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS] Windows 11 (OS build 22000.739)
- Browser [e.g. chrome, safari] Microsoft edge
- Version [e.g. 22]
IPython : 8.4.0
ipykernel : 6.15.0
ipywidgets : not installed
jupyter_client : 7.3.4
jupyter_core : 4.10.0
jupyter_server : not installed
jupyterlab : not installed
nbclient : 0.6.4
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : not installed
traitlets : 5.3.0
Python 3.9.12
**Additional context**
Add any other context about the problem here.
It is asked on discourse too [(rename_failed)](https://discourse.jupyter.org/t/rename-failed-os-path-is-not-defined/14687)

Contributor guide
Research direction
Inspect the rename_file function around line 579, then reproduce the issue through the File tab's Rename action. Confirm that the undefined-name error no longer occurs and that the file is renamed successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100