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

A more informative message for ImportError #47869

Closed
ktenney mannequin opened this issue Aug 20, 2008 · 2 comments
Closed

A more informative message for ImportError #47869

ktenney mannequin opened this issue Aug 20, 2008 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@ktenney
Copy link
Mannequin

ktenney mannequin commented Aug 20, 2008

BPO 3619
Nosy @brettcannon
Files
  • from-import-py2.5.1.patch: patch to ceval.c from Wojtek Walczak Re: ImportError
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/brettcannon'
    closed_at = <Date 2009-04-02.05:35:25.061>
    created_at = <Date 2008-08-20.14:00:33.990>
    labels = ['interpreter-core', 'type-feature']
    title = 'A more informative message for ImportError'
    updated_at = <Date 2009-04-02.05:35:24.942>
    user = 'https://bugs.python.org/ktenney'

    bugs.python.org fields:

    activity = <Date 2009-04-02.05:35:24.942>
    actor = 'brett.cannon'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2009-04-02.05:35:25.061>
    closer = 'brett.cannon'
    components = ['Interpreter Core']
    creation = <Date 2008-08-20.14:00:33.990>
    creator = 'ktenney'
    dependencies = []
    files = ['11173']
    hgrepos = []
    issue_num = 3619
    keywords = ['patch']
    message_count = 2.0
    messages = ['71542', '85167']
    nosy_count = 2.0
    nosy_names = ['brett.cannon', 'ktenney']
    pr_nums = []
    priority = 'low'
    resolution = 'wont fix'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3619'
    versions = ['Python 3.1', 'Python 2.7']

    @ktenney
    Copy link
    Mannequin Author

    ktenney mannequin commented Aug 20, 2008

    from foo import bar
    ImportError: cannot import name bar

    The error may be due to the wrong 'foo' being found, some investigation
    is required.

    If the the ImportError message included the filename for 'foo', the
    problem would be obvious.
    ImportError cannot import name bar from /usr/lib/<snip>/foo.pyc

    A c.l.p. thread on this is at
    http://groups.google.com/group/comp.lang.python/browse_thread/thread/88474a32877026fc/

    a patch from Wojtek Walczak is here and attached
    http://www.stud.umk.pl/~wojtekwa/patches/from-import-py2.5.1.patch

    a thread about it on python-dev is here
    http://mail.python.org/pipermail/python-dev/2008-August/081889.html

    including a comment on the patch
    http://mail.python.org/pipermail/python-dev/2008-August/081897.html

    @ktenney ktenney mannequin added the type-feature A feature request or enhancement label Aug 20, 2008
    @benjaminp benjaminp added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Aug 20, 2008
    @devdanzin devdanzin mannequin assigned brettcannon Feb 11, 2009
    @brettcannon
    Copy link
    Member

    Closing as "won't fix" as this assumes that path information is
    applicable to all importers which is not correct.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants