SourceForge logo
SourceForge logo
Menu

matplotlib-users

Python claims to be unable to import pyplot. Apart from that, it has been
running absolutely fine.
I tried different versions of matplotlib, the one provided in my package
manager (apt-get) and two (stable & last stable) releases compiled from
source. I reinstalled all packages containting "python" on my system (Ubuntu
14.04 LTS). This error still occurs and prevents me from using pyplot.
What should I try next?
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
>>> from matplotlib import pyplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
<module>
 import matplotlib.colorbar
File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
<module>
 import matplotlib.collections as collections
File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in
<module>
 import matplotlib.backend_bases as backend_bases
File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, in
<module>
 import matplotlib.textpath as textpath
File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
<module>
 import matplotlib.font_manager as font_manager
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356,
in <module>
 _rebuild()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341,
in _rebuild
 fontManager = FontManager()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008,
in __init__
 self.afmlist = createFontList(self.afmfiles, fontext='afm')
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, in
createFontList
 font = afm.AFM(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in __init__
 parse_afm(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
parse_afm
 dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
_parse_char_metrics
 bbox = _to_list_of_floats(vals[3][2:])
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
_to_list_of_floats
 return [_to_float(val) for val in s.split()]
ValueError: invalid literal for float(): 19#
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
You have an afm font file with a badly formed header. I thought this was
fixed on the master branch though....
On Fri, Aug 7, 2015 at 4:51 PM knight91 <kni...@we...> wrote:
> Python claims to be unable to import pyplot. Apart from that, it has been
> running absolutely fine.
>
> I tried different versions of matplotlib, the one provided in my package
> manager (apt-get) and two (stable & last stable) releases compiled from
> source. I reinstalled all packages containting "python" on my system
> (Ubuntu
> 14.04 LTS). This error still occurs and prevents me from using pyplot.
>
> What should I try next?
>
> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
> [GCC 4.8.2] on linux2
> >>> from matplotlib import pyplot
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
> <module>
> import matplotlib.colorbar
> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
> <module>
> import matplotlib.collections as collections
> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in
> <module>
> import matplotlib.backend_bases as backend_bases
> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50,
> in
> <module>
> import matplotlib.textpath as textpath
> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
> <module>
> import matplotlib.font_manager as font_manager
> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356,
> in <module>
> _rebuild()
> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341,
> in _rebuild
> fontManager = FontManager()
> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008,
> in __init__
> self.afmlist = createFontList(self.afmfiles, fontext='afm')
> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563,
> in
> createFontList
> font = afm.AFM(fh)
> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in
> __init__
> parse_afm(fh)
> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
> parse_afm
> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
> _parse_char_metrics
> bbox = _to_list_of_floats(vals[3][2:])
> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
> _to_list_of_floats
> return [_to_float(val) for val in s.split()]
> ValueError: invalid literal for float(): 19#
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Okay, is there a way to get an afm font file with a nicely formed header? How
could I try to solve this problem?
Thomas Caswell wrote
> You have an afm font file with a badly formed header. I thought this was
> fixed on the master branch though....
> 
> On Fri, Aug 7, 2015 at 4:51 PM knight91 &lt;
> knight91@
> &gt; wrote:
> 
>> Python claims to be unable to import pyplot. Apart from that, it has been
>> running absolutely fine.
>>
>> I tried different versions of matplotlib, the one provided in my package
>> manager (apt-get) and two (stable & last stable) releases compiled from
>> source. I reinstalled all packages containting "python" on my system
>> (Ubuntu
>> 14.04 LTS). This error still occurs and prevents me from using pyplot.
>>
>> What should I try next?
>>
>> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
>> [GCC 4.8.2] on linux2
>> >>> from matplotlib import pyplot
>> Traceback (most recent call last):
>> File "
> <stdin>
> ", line 1, in 
> <module>
>> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
>> 
> <module>
>> import matplotlib.colorbar
>> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
>> 
> <module>
>> import matplotlib.collections as collections
>> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23,
>> in
>> 
> <module>
>> import matplotlib.backend_bases as backend_bases
>> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50,
>> in
>> 
> <module>
>> import matplotlib.textpath as textpath
>> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
>> 
> <module>
>> import matplotlib.font_manager as font_manager
>> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> 1356,
>> in 
> <module>
>> _rebuild()
>> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> 1341,
>> in _rebuild
>> fontManager = FontManager()
>> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> 1008,
>> in __init__
>> self.afmlist = createFontList(self.afmfiles, fontext='afm')
>> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563,
>> in
>> createFontList
>> font = afm.AFM(fh)
>> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in
>> __init__
>> parse_afm(fh)
>> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
>> parse_afm
>> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
>> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
>> _parse_char_metrics
>> bbox = _to_list_of_floats(vals[3][2:])
>> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
>> _to_list_of_floats
>> return [_to_float(val) for val in s.split()]
>> ValueError: invalid literal for float(): 19#
>>
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
I don't know for certain, but perhaps the font-forge program has a repair
utility? http://fontforge.github.io/en-US/
On Sat, Aug 8, 2015 at 5:51 AM, knight91 <kni...@we...> wrote:
> Okay, is there a way to get an afm font file with a nicely formed header?
> How
> could I try to solve this problem?
>
>
> Thomas Caswell wrote
> > You have an afm font file with a badly formed header. I thought this was
> > fixed on the master branch though....
> >
> > On Fri, Aug 7, 2015 at 4:51 PM knight91 &lt;
>
> > knight91@
>
> > &gt; wrote:
> >
> >> Python claims to be unable to import pyplot. Apart from that, it has
> been
> >> running absolutely fine.
> >>
> >> I tried different versions of matplotlib, the one provided in my package
> >> manager (apt-get) and two (stable & last stable) releases compiled from
> >> source. I reinstalled all packages containting "python" on my system
> >> (Ubuntu
> >> 14.04 LTS). This error still occurs and prevents me from using pyplot.
> >>
> >> What should I try next?
> >>
> >> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
> >> [GCC 4.8.2] on linux2
> >> >>> from matplotlib import pyplot
> >> Traceback (most recent call last):
> >> File "
> > <stdin>
> > ", line 1, in
> > <module>
> >> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
> >>
> > <module>
> >> import matplotlib.colorbar
> >> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
> >>
> > <module>
> >> import matplotlib.collections as collections
> >> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23,
> >> in
> >>
> > <module>
> >> import matplotlib.backend_bases as backend_bases
> >> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line
> 50,
> >> in
> >>
> > <module>
> >> import matplotlib.textpath as textpath
> >> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
> >>
> > <module>
> >> import matplotlib.font_manager as font_manager
> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
> >> 1356,
> >> in
> > <module>
> >> _rebuild()
> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
> >> 1341,
> >> in _rebuild
> >> fontManager = FontManager()
> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
> >> 1008,
> >> in __init__
> >> self.afmlist = createFontList(self.afmfiles, fontext='afm')
> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
> 563,
> >> in
> >> createFontList
> >> font = afm.AFM(fh)
> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in
> >> __init__
> >> parse_afm(fh)
> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
> >> parse_afm
> >> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
> >> _parse_char_metrics
> >> bbox = _to_list_of_floats(vals[3][2:])
> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
> >> _to_list_of_floats
> >> return [_to_float(val) for val in s.split()]
> >> ValueError: invalid literal for float(): 19#
> >>
>
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Also try deleting your font cache.
Have you tried with the master branch?
Tom
On Mon, Aug 10, 2015 at 9:21 AM Benjamin Root <ben...@ou...> wrote:
> I don't know for certain, but perhaps the font-forge program has a repair
> utility? http://fontforge.github.io/en-US/
>
> On Sat, Aug 8, 2015 at 5:51 AM, knight91 <kni...@we...> wrote:
>
>> Okay, is there a way to get an afm font file with a nicely formed header?
>> How
>> could I try to solve this problem?
>>
>>
>> Thomas Caswell wrote
>> > You have an afm font file with a badly formed header. I thought this
>> was
>> > fixed on the master branch though....
>> >
>> > On Fri, Aug 7, 2015 at 4:51 PM knight91 &lt;
>>
>> > knight91@
>>
>> > &gt; wrote:
>> >
>> >> Python claims to be unable to import pyplot. Apart from that, it has
>> been
>> >> running absolutely fine.
>> >>
>> >> I tried different versions of matplotlib, the one provided in my
>> package
>> >> manager (apt-get) and two (stable & last stable) releases compiled from
>> >> source. I reinstalled all packages containting "python" on my system
>> >> (Ubuntu
>> >> 14.04 LTS). This error still occurs and prevents me from using pyplot.
>> >>
>> >> What should I try next?
>> >>
>> >> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
>> >> [GCC 4.8.2] on linux2
>> >> >>> from matplotlib import pyplot
>> >> Traceback (most recent call last):
>> >> File "
>> > <stdin>
>> > ", line 1, in
>> > <module>
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
>> >>
>> > <module>
>> >> import matplotlib.colorbar
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
>> >>
>> > <module>
>> >> import matplotlib.collections as collections
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23,
>> >> in
>> >>
>> > <module>
>> >> import matplotlib.backend_bases as backend_bases
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line
>> 50,
>> >> in
>> >>
>> > <module>
>> >> import matplotlib.textpath as textpath
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
>> >>
>> > <module>
>> >> import matplotlib.font_manager as font_manager
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> >> 1356,
>> >> in
>> > <module>
>> >> _rebuild()
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> >> 1341,
>> >> in _rebuild
>> >> fontManager = FontManager()
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> >> 1008,
>> >> in __init__
>> >> self.afmlist = createFontList(self.afmfiles, fontext='afm')
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line
>> 563,
>> >> in
>> >> createFontList
>> >> font = afm.AFM(fh)
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in
>> >> __init__
>> >> parse_afm(fh)
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
>> >> parse_afm
>> >> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
>> >> _parse_char_metrics
>> >> bbox = _to_list_of_floats(vals[3][2:])
>> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
>> >> _to_list_of_floats
>> >> return [_to_float(val) for val in s.split()]
>> >> ValueError: invalid literal for float(): 19#
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /