khaledsayed12 / namebench

Automatically exported from code.google.com/p/namebench
Apache License 2.0
0 stars 0 forks source link

running namebench.py is tied to location in filesystem #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install using README instructions
2. go to some random directory (e.g., /tmp)
3. run namebench.py

What is the expected output? What do you see instead?

Expected output same as when run in original directory (namebench-1.0.5/)

Actual output

(1) Out of the box:

Traceback (most recent call last):
  File "/usr/local/bin/namebench.py", line 45, in <module>
    (options, supplied_ns, global_ns, regional_ns) = 
config.GetConfiguration()
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/config.py", 
line 27, in GetConfiguration
    (configured_options, global_ns, regional_ns) = 
ProcessConfigurationFile(options)
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/config.py", 
line 100, in ProcessConfigurationFile
    general = dict(config.items('general'))
  File "/usr/lib/python2.6/ConfigParser.py", line 564, in items
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'

(2) After copying namebench.cfg to $PWD/namebench.cfg:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/tk.py", line 
103, in run
    self.RunBenchmark()
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/base_ui.py", 
line 91, in RunBenchmark
    self.CreateReports()
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/base_ui.py", 
line 102, in CreateReports
    self.bmark.CreateReport(format='html', output_fp=f, 
config=self.options, csv_path=self.csv_path)
  File "/usr/local/lib/python2.6/dist-packages/libnamebench/benchmark.py", 
line 294, in CreateReport
    template = env.get_template(template_name)
  File "/usr/local/lib/python2.6/dist-
packages/third_party/jinja2/environment.py", line 552, in get_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "/usr/local/lib/python2.6/dist-
packages/third_party/jinja2/loaders.py", line 96, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/local/lib/python2.6/dist-
packages/third_party/jinja2/loaders.py", line 161, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: html.tmpl
Showing popup: html.tmpl

What version of the product are you using? On what operating system?
namebench-1.0.5, Ubuntu 9.10

Please provide any additional information below.

namebench.py runs successfully from the original directory used to unpack 
and build namebench.  It also runs successfully from the installation 
directory (/usr/local/namebench/).  It appears to look in $PWD for 
configuration and template information.

Original issue reported on code.google.com by jeffrey....@gmail.com on 21 Dec 2009 at 8:55

GoogleCodeExporter commented 8 years ago
Same ConfigParser error on Ubuntu 9.10 after running pip on the tarball.

Original comment by danlips...@gmail.com on 31 Dec 2009 at 8:39

GoogleCodeExporter commented 8 years ago
This is fixed in r563- included in namebench 1.1b1.

Original comment by thomas.r...@gmail.com on 3 Jan 2010 at 11:06