I am following your tutorial verbatim (I just changed the directory and file
names), and when I get to the part that generates the graphs:
>>> from pyrrd.graph import Graph
>>> #graphfile = "/tmp/rrdgraph.png"
... graphfile = "c:/temp/rrdgraph.png"
>>> g = Graph(graphfile, start=920805000, end=920810000,
... vertical_label='km/h', color=ca)
>>> g.data.extend([def1, cdef1, cdef2, cdef3, vdef1, vdef2, line1, area1,
... area2, line2, gprint1])
>>> g.write()
I get this output:
rrdtool graph c:/temp/rrdgraph.png --start 920805000 --end 920810000
--vertical-label km/h --color ARROW#FFFFFF --color AXIS#FFFFFF --color
BACK#333333 --color CANVAS#333333 --color FONT#FFFFFF --color FRAME#AAAAAA
--color MGRID#CCCCCC --color SHADEA#000000 --color SHADEB#111111
--imgformat PNG DEF:myspeed=c\:/temp/test.rrd:speed:AVERAGE
CDEF:kmh=myspeed,3600,* CDEF:fast=kmh,100,GT,kmh,0,IF CDEF:good=kmh,100,GT,0,kmh
,IF VDEF:mymax=myspeed,MAXIMUM VDEF:myavg=myspeed,AVERAGE
LINE:100#990000:"Maximum Allowed" AREA:good#006600:"Good Speed"
AREA:fast#CC6633:"
Too Fast" LINE:myavg#000099:"My Average":STACK GPRINT:myavg:"%6.2lf kph"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python34\lib\site-packages\pyrrd-0.1.0-py3.4.egg\pyrrd\graph.py", line 851, in write
File "C:\Python34\lib\site-packages\pyrrd-0.1.0-py3.4.egg\pyrrd\backend\external.py", line 242, in graph
File "C:\Python34\lib\site-packages\pyrrd-0.1.0-py3.4.egg\pyrrd\backend\external.py", line 21, in _cmd
pyrrd.exceptions.ExternalCommandError: b'ERROR: failed to load
/usr/local/rrdtool-1.2.15/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf'
I am using:
- Windows 7
- rrdtool-1.2.15-cygwin-1.5.20
- Python 3.4
- PyRRD-0.1.0
Note: Since PyRRD was built for Python 2.7, prior to installing I ran the
script:
C:\Python34\Tools\Scripts\2to3.py -w <PyRRD_DIR>
All seemed to work until now: the installation, all RRD commands...
This seems like a problem with the location of the fonts. What can be done do
correct this on a Windows platform?
Original issue reported on code.google.com by ruivitor...@gmail.com on 26 May 2015 at 2:56
Original issue reported on code.google.com by
ruivitor...@gmail.com
on 26 May 2015 at 2:56