Skip to content

IPython notebook autocomplete for filename string converts multiple spaces to a single space #3044

@JDWarner

Description

@JDWarner

The title mainly says it all. If you had a file in relative subdir './foo/bar' named 'too__many___spaces.txt' [edit: convert underscores to spaces, because GitHub markdown auto-stripped down to one space too!], entering fid = open('./foo/bar into the notebook and pressing tab, will present you with a version of the filename with all multiple spaces converted to single spaces.

Needless to say, the result unexpectedly throws a "file not found" error despite the notebook obviously finding said file.

Manually entered filename strings with multiple spaces work as expected; this is limited to autocomplete.

This behavior is exclusive to the browser notebook; using IPython in a terminal preserves multiple spaces in autocompleted filenames.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions