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

"Exception occurred: pop from empty list" #47

Closed
shreyashankar opened this issue Jan 29, 2021 · 6 comments
Closed

"Exception occurred: pop from empty list" #47

shreyashankar opened this issue Jan 29, 2021 · 6 comments

Comments

@shreyashankar
Copy link
Contributor

I don't know how to print the call stack in a Jupyterhub notebook, so unfortunately my explanation may not be super helpful. I'm noticing the error Exception occurred: pop from empty list when running a cell that seems to have acceptable logic, and this error doesn't show up when working with a non-nbsafety / regular Jupyter notebook.

Screen Shot 2021-01-29 at 1 13 50 AM

Screen Shot 2021-01-29 at 1 13 33 AM

I am still able to do my work if I ignore the error, but I just thought I'd make the issue :)

@smacke
Copy link
Member

smacke commented Jan 30, 2021

Hi @shreyashankar, thanks so much for opening an issue. As you mentioned, these cryptic back-end error messages won't affect your ability to get work done etc, but they are definitely an annoyance.

I'm unfortunately having trouble reproducing the issue. This project is still a little bit in wild west land, so it's possible it was hotfixed already and should start behaving after an upgrade. What version are you on? (Latest is 0.0.56). You can check by running the following:

>>> import nbsafety
>>> nbsafety.version.__version__
'0.0.56'

@smacke
Copy link
Member

smacke commented Jan 30, 2021

(Also, it might go away after running pip install --upgrade nbsafety)

@shreyashankar
Copy link
Contributor Author

nbsafety.version.__version__ gives me AttributeError: module 'nbsafety' has no attribute 'version' but looking in my venv directory, I see that the version is 0.0.56. Sorry you are unable to reproduce the error, though! I will keep tinkering around slowly and let you know if I learn more about this issue.

@smacke
Copy link
Member

smacke commented Feb 1, 2021

Woops! I should have suggested import nbsafety.version

That's very interesting that the broken behavior is present on 0.0.56. Based on the example code to reproduce, I believe this is related to a stack unwinding mechanism used by nbsafety, in which case there could be some platform-dependent behavior depending on whether one is on Windows and which exact version of Python is being used.

Toward this end, I've tried testing on Windows, Ubuntu, and MacOS for all of 3.6, 3.7, 3.8, and 3.9, and unfortunately no dice. I bet I could reproduce if I knew the Python minor revision though.

Along those lines, could I trouble you for:
(a) the OS you're using, and
(b) the exact version of Python you're using?

Finally, I made an educated guess and published a new version, which can be installed via pip install --upgrade nbsafety. If you do happen to have a spare moment, would you be willing to run through your example code again and see whether the issue is still present?

Either way thank you so much for trying out nbsafety and for taking the time to open the issue in the first place! As you can probably see it's pretty tricky to support this functionality in a performant manner across a lot of different environments, so the more folks who take the time to report bugs, the less we're operating with a blindfold during development :)

@shreyashankar
Copy link
Contributor Author

I just upgraded to nbsafety-0.0.57 and do not see the problem anymore. Thanks for being super responsive! Closing the issue. :)

@smacke
Copy link
Member

smacke commented Feb 4, 2021

Awesome! Glad the fix did the trick.

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