GoogleCodeArchives / svnplot

Automatically exported from code.google.com/p/svnplot
0 stars 0 forks source link

linux machine without X-server #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. execute 
python  svnplot.py -v --dpi 70 -p svnplot-long.tmpl -n "irk" irk.sql ../svn
on Linux machine without X-server

What is the expected output? What do you see instead?
Expected: generated png and htm files in ../svn directory
Instead I see:
Calculating subversion stat graphs
Subversion log database : irk.sql
Graphs will generated in : ../svn
Repository Name : irk
Search path inside repository : /%
Graph thumbnail size : 100
Maximum dir count: 10
using template : svnplot-long.tmpl
Set the search path to /
Calculating Activity by day of week graph
Traceback (most recent call last):
  File "svnplot.py", line 723, in <module>
    RunMain()
  File "svnplot.py", line 720, in RunMain
    svnplot.AllGraphs(graphdir, options.searchpath, options.thumbsize,
options.maxdircount)
  File "svnplot.py", line 234, in AllGraphs
    self.ActivityByWeekday(self._getGraphFileName(dirpath, "ActByWeek"))
  File "svnplot.py", line 266, in ActivityByWeekday
    ax = self._drawBarGraph(data, labels,0.5)
  File "/var/www/intranet/htdocs/svnplot/svnplotbase.py", line 77, in
_drawBarGraph
    fig = plt.figure()
  File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line 254,
in figure
    **kwargs)
  File
"/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.py",
line 90, in new_figure_manager
    window = Tk.Tk()
  File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 1643, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive,
wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

What version of the product are you using? On what operating system?
from svn rev.256
Gentoo Linux kernel 2.6.30

Please provide any additional information below.
solve problem by patching
===================================================================
--- svnplotbase.py  (revision 256)
+++ svnplotbase.py  (working copy)
@@ -10,6 +10,9 @@
 __revision__ = '$Revision:$'
 __date__     = '$Date:$'

+#import matplotlib
+#matplotlib.use("Agg")
+
 import matplotlib.pyplot as plt
 from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
 from matplotlib.ticker import FixedLocator, FormatStrFormatter
Index: svnplot.py
===================================================================
--- svnplot.py  (revision 256)
+++ svnplot.py  (working copy)
@@ -35,6 +35,8 @@
 __revision__ = '$Revision:$'
 __date__     = '$Date:$'

+#import matplotlib
+#matplotlib.use("Agg")

 import matplotlib.pyplot as plt
 import matplotlib.mpl as mpl

Original issue reported on code.google.com by korot...@gmail.com on 9 Feb 2010 at 3:15

GoogleCodeExporter commented 9 years ago
sorry, forget remove comment symbols
real patch
===================================================================
--- svnplotbase.py  (revision 256)
+++ svnplotbase.py  (working copy)
@@ -10,6 +10,9 @@
 __revision__ = '$Revision:$'
 __date__     = '$Date:$'

+import matplotlib
+matplotlib.use("Agg")
+
 import matplotlib.pyplot as plt
 from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
 from matplotlib.ticker import FixedLocator, FormatStrFormatter
Index: svnplot.py
===================================================================
--- svnplot.py  (revision 256)
+++ svnplot.py  (working copy)
@@ -35,6 +35,8 @@
 __revision__ = '$Revision:$'
 __date__     = '$Date:$'

+import matplotlib
+matplotlib.use("Agg")

 import matplotlib.pyplot as plt
 import matplotlib.mpl as mpl

Original comment by korot...@gmail.com on 9 Feb 2010 at 3:46

GoogleCodeExporter commented 9 years ago
Thanks for patch. I will add the fix to trunk this weekend. It will be 
available in next release.

Original comment by nitinbh...@gmail.com on 10 Feb 2010 at 3:44

GoogleCodeExporter commented 9 years ago
Issue 23 has been merged into this issue.

Original comment by nitinbh...@gmail.com on 13 Feb 2010 at 3:08

GoogleCodeExporter commented 9 years ago
svnplot-js is now available in trunk. svnplot-js generates plots as 'client 
side' java script and donot have dependency on matplotlib or numpy.

Original comment by nitinbh...@gmail.com on 12 Mar 2010 at 4:58

GoogleCodeExporter commented 9 years ago
Fixed in trunk will be available in next release. Sorry for the delay.

Original comment by nitinbh...@gmail.com on 25 Aug 2010 at 6:32