Skip to content

relative path doesn #480

@amogorkon

Description

@amogorkon

in jupyter notebook 3.8

pipes = use(use.Path("../code/pipes.py")).pipes

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
/tmp/ipykernel_3221/3387234922.py in <module>
----> 1 pipes = use(use.Path("../code/pipes.py")).pipes

~/anaconda3/lib/python3.8/site-packages/use/main.py in __call__(self, *args, **kwargs)
    133     def __call__(self, *args, **kwargs):
    134         with self.__condition:
--> 135             return self.__implementation(*args, **kwargs)
    136 
    137     # to allow `numpy @ use` for a quick check

~/anaconda3/lib/python3.8/site-packages/use/tools.py in wrapper(*args, **kwargs)
     44                 raise NirvanaWarning("No use trying to use Nothing.")
     45             args = args + (None,)
---> 46         return dispatcher.dispatch(args[1].__class__)(*args, **kwargs)
     47 
     48     wrapper.register = dispatcher.register

~/anaconda3/lib/python3.8/site-packages/use/main.py in _use_path(self, path, initial_globals, as_import, default, modes)
    487             exc = traceback.format_exc()
    488 
--> 489         with open(path, "rb") as rfile:
    490             code = rfile.read()
    491         try:

FileNotFoundError: [Errno 2] No such file or directory: '../code/pipes.py'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions