Skip to content

fixes directory not found error when preferred_dir is set #12220

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

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

andrewfulton9
Copy link
Contributor

References

#12111

Code changes

Made change to filebrowser FileBrowserModel.restore so that if it is restoring a path from a previous session, it cds to the root directory before restoring the path. This fixes the directory not found error thrown when preferred_dir was set and the user was restoring a previous session with a sub-folder of the preferred_dir.

User-facing changes

User will no longer get a directory not found error when restoring a previous session in a sub-folder of their set preferred_dir.

Backwards-incompatible changes

None that I am aware.

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the identified failing scenario (both root_dir and preferred_dir set), and now no more error message is shown and the opened notebook is restored. LGTM. Thx @andrewfulton9

@echarles echarles merged commit f91e9f0 into jupyterlab:master Mar 20, 2022
@echarles
Copy link
Member

@meeseeksdev please backport to 3.3.x

@github-actions
Copy link
Contributor

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser.
For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

The mean relative comparison is computed with 95% confidence.

Results table
Test file large_code_notebook large_md_notebook
open
chromium
actual 4454 <- [4624 - 4678 - 4736] -> 5111 2940 <- [3035 - 3076 - 3144] -> 3355
expected 4374 <- [4559 - 4620 - 4681] -> 5268 2878 <- [3011 - 3054 - 3102] -> 3285
Mean relative change 1.0% ± 0.7% 1.4% ± 0.8%
switch-from
chromium
actual 694 <- [755 - 783 - 818] -> 1068 526 <- [560 - 572 - 584] -> 1216
expected 692 <- [737 - 763 - 825] -> 1235 515 <- [549 - 565 - 584] -> 1270
Mean relative change 0.6% ± 3.5% -0.4% ± 4.5%
switch-to
chromium
actual 364 <- [417 - 436 - 455] -> 609 293 <- [339 - 349 - 359] -> 407
expected 357 <- [402 - 425 - 441] -> 613 301 <- [325 - 341 - 354] -> 384
Mean relative change 2.8% ± 2.8% 2.9% ± 1.7%
close
chromium
actual 684 <- [759 - 1085 - 1114] -> 1237 546 <- [577 - 592 - 607] -> 639
expected 669 <- [722 - 1048 - 1088] -> 1209 556 <- [572 - 588 - 601] -> 629
Mean relative change 7.5% ± 5.8% 0.9% ± 0.9%

Changes are computed with expected as reference.

@echarles
Copy link
Member

@jtpio @fcollonval @meeseeksdev please backport to 3.3.x is completely silent and does not generate the expected PR. Is it a temporary issue?

@jtpio
Copy link
Member

jtpio commented Mar 20, 2022

Maybe Meeseeks is down at the moment. We can give it another try and otherwise report on the repo.

Looks like this issue might be related: scientific-python/MeeseeksDev#59

@jtpio
Copy link
Member

jtpio commented Mar 20, 2022

@meeseeksdev please backport to 3.3.x

@echarles
Copy link
Member

@messeeksdev is back up and running. thx @jtpio

echarles added a commit that referenced this pull request Mar 21, 2022
…220-on-3.3.x

Backport PR #12220 on branch 3.3.x (fixes directory not found error when preferred_dir is set)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants