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

superimport sometimes does not work in jupyter notebook inside VScode #2

Open
murphyk opened this issue Sep 1, 2021 · 0 comments
Open

Comments

@murphyk
Copy link
Member

murphyk commented Sep 1, 2021

Screen Shot 2021-09-01 at 12 51 21 PM

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ipykernel_106780/1059911102.py'
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
/tmp/ipykernel_106780/1059911102.py in <module>
----> 1 import superimport

~/.local/lib/python3.8/site-packages/superimport/__init__.py in <module>
----> 1 from superimport import superimport

~/.local/lib/python3.8/site-packages/superimport/superimport.py in <module>
    215 
    216 
--> 217 imports = get_imports_depending_on_context()
    218 # Check if each package is already installed.
    219 # If not, install it.

~/.local/lib/python3.8/site-packages/superimport/superimport.py in get_imports_depending_on_context()
    168             files_to_skip={'superimport.py','__init__.py','setup.py','interactiveshell.py', 'ipykernel_launcher.py', 'zmqstream.py', 'base_events.py', 'kernelbase.py', 'events.py', 'runpy.py', 'ipkernel.py', 'zmqshell.py', 'application.py', 'asyncio.py', 'stack_context.py', 'kernelapp.py'}
    169             if frame.filename[0] != "<" and file_name not in files_to_skip:
--> 170                 fc = open(frame.filename).read()
    171                 remove_list=["import superimport\n","from superimport.superimport import unload","from superimport import superimport"]
    172                 for r in remove_list:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ipykernel_106780/1059911102.py'
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

1 participant