New issue 62 by mikecockrem: hntool traceback, program exection fails
http://code.google.com/p/hntool/issues/detail?id=62
What steps will reproduce the problem?
1. Install HNTool with 'python2' (with python, fails)
2. Attempt to run tool
3. See below:
What is the expected output? What do you see instead?
Expected output: program runs
Actual output:
[root]# hntool
[ Starting HnTool checks... ]
Traceback (most recent call last):
File "/usr/bin/hntool", line 29, in <module>
hn.run_tests()
File "/usr/lib/python2.7/site-packages/HnTool/core.py", line 221, in
run_tests
'results': self.rule_modules[m].analyze(self.options)})
File "/usr/lib/python2.7/site-packages/HnTool/modules/filesystems.py",
line 57, in analyze
datafile = locate_database[os_type]
UnboundLocalError: local variable 'os_type' referenced before assignment
What version of the product are you using? On what operating system?
hntool-0.1.2
Python 3.1.2
Linux 2.6.35-ARCH #1 SMP PREEMPT x86_64 AMD Opteron(tm) Processor 248
Please provide any additional information below.
Happy to provide any additional information
Comment #1 on issue 62 by hugodoria: hntool traceback, program exection
fails
http://code.google.com/p/hntool/issues/detail?id=62
Hi Mike,
Thanks for your report. :)
Could you tell me how did you installed HnTool?
Hi,
Distribution: Arch Linux x64
Installed as such:
1). wget -c http://hntool.googlecode.com/files/hntool-0.1.2.tar.gz
2). tar hntool-0.1.2.tar.gz
3). cd hntool-0.1.2.tar.gz
4). python setup.py install --prefix /usr/ --root /
Produces this error:
Traceback (most recent call last):
File "setup.py", line 3, in <module>
from setuptools import setup
ImportError: No module named setuptools
Attempted to install as such:
1-3). (steps as above)
4). python2 setup.py install --prefix /usr/ --root /
This results in success however when the program is invoked the above error
occurs.
NB: I have installed setuptools via pacman which
installs: "python2-distribute provides setuptools"
Regards,
Mike.
Quick update, Did a full update including python and also tested this on
another machine: same problem. Reproducible from my end. Cheers.
Can you please tell me if you have that files:
/var/lib/mlocate/mlocate.db
and
/usr/bin/updatedb
???
Hi,
We don't use mlocate due to data isolation/security requirements at this
site.
Wasn't aware it was a dep.
Regards,
Mike.
It should not be a dep.
Hugo,
Can you please take a look that?
An collaborator who does not want to sign up with google send me that
patch. Please apply that patch and let me know if solve your problem.
Attachments:
fix-issue-62.patch 1.4 KB
1). Installed: "python2 setup.py install --prefix /usr/ --root /"
2). Edited line 37 in patch to read "find" not "found" (No big deal :)
3). Applied patch:
"patch /usr/lib/python2.7/site-packages/HnTool/modules/filesystems.py \
< /hgchangeset.patch"
4). Successfully executed hntool at the cli
This resolves my issue, thanks.
Suggest you merge this.
Kind regards,
Mike.
1). Installed: "python2 setup.py install --prefix /usr/ --root /"
2). Edited line 37 for grammer (No big deal at all, cosmetic :)
3). Applied patch:
"patch /usr/lib/python2.7/site-packages/HnTool/modules/filesystems.py \
< /home/mike/fix-issue-62-b.patch.patch"
4). Successfully executed hntool at the cli
This resolves my issue, thanks.
Suggest you merge this.
Great project guys, please feel free to
rely on me for any testing you need in future.
Kind regards,
Mike.
Attachments:
fix-issue-62-b.patch 1.5 KB
Comment #10 on issue 62 by linux.rafa: hntool traceback, program exection
fails
http://code.google.com/p/hntool/issues/detail?id=62
The patch did push. Issue 62 closed.
Comment #11 on issue 62 by linux.rafa: hntool traceback, program exection
fails
http://code.google.com/p/hntool/issues/detail?id=62
(No comment was entered for this change.)