Thanks to visit codestin.com
Credit goes to github.com

Skip to content

from matplotlib.backends import _tkagg raises AttributeError: 'module' object has no attribute '__file__' #7428

Closed
@ettaka

Description

@ettaka

Matplotlib version: built from source after commit ba019f7 (8.11.2016)
Python version: 2.7.12 (built from source)
Platform: Ubuntu Linux 14.04

The following dialog with python interpreter demonstrates the problem I'm having:

from matplotlib.backends import _tkagg
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'file'
_tkagg
Traceback (most recent call last):
File "", line 1, in
NameError: name '_tkagg' is not defined
from matplotlib.backends import _tkagg
_tkagg
<module 'matplotlib.backends._tkagg' (built-in)>

Here are the key points:

  1. Python is not able to import matplotlib.backends._tkagg at first
  2. When the import is tried the second time it is succesfull
  3. The _tkagg is built-in module which I believe should not have 'file' attribute but at first Python would like to have it

Please advise.

Best Regards,

Eelis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions