[Tutor] Matplotlib error with Python

Pooja Bhalode poojabhalode11 at gmail.com
Wed May 17 11:36:54 EDT 2017


Hi Alan,

Yes, that was the issue, I had a tempfile.py created my me some time back.
That was interfering with this one.
Thanks a lot for your input.

Hope you have a great day!
Pooja

On Wed, May 17, 2017 at 11:27 AM, Alan Gauld via Tutor <tutor at python.org>
wrote:

> On 17/05/17 15:07, Pooja Bhalode wrote:
>
> > */Users/poojabhalode/.bash_profile: line 1: .bashrc: No such file or
> > directory*
>
> I'd start with this one.
> Where is the bash script error coming from?
> Is there really no .bashrc?
> If not what is the impact of not having it?
>
> I'm also not clear what is calling bashrc...
>
> > *[[ 2 -1  0]*
> > * [-1  2 -1]*
>
> I have no idea what these numbers are.
>
> > *Traceback (most recent call last):*
> > *  File "/Users/poojabhalode/Google Drive/PYTHON/files/1sttest/
> May17.py",
> > line 7, in <module>*
> > *    import matplotlib*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 947, in <module>*
> > *    rcParams = rc_params()*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 856, in rc_params*
> > *    fname = matplotlib_fname()*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 726, in matplotlib_fname*
> > *    configdir = _get_configdir()*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 597, in _get_configdir*
> > *    return _get_config_or_cache_dir(_get_xdg_config_dir())*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 566, in _get_config_or_cache_dir*
> > *    if not _is_writable_dir(p):*
> > *  File
> > "/System/Library/Frameworks/Python.framework/Versions/2.7/
> Extras/lib/python/matplotlib/__init__.py",
> > line 228, in _is_writable_dir*
> > *    t = tempfile.TemporaryFile(dir=p)*
> > *AttributeError: 'module' object has no attribute 'TemporaryFile'*
>
> You don't happen to have a file called tempfile.py in your
> folder by any chance? It could be that the code is picking
> it up instead of the standard library version?
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list