hpcugent / hanythingondemand

hanythingondemand provides a set of scripts to easily set up an ad-hoc Hadoop cluster through PBS jobs
https://hod.readthedocs.org
GNU General Public License v2.0
12 stars 6 forks source link

pass string rather than Exception instance as argument to raiseException #191

Closed boegel closed 7 years ago

boegel commented 7 years ago

fix for this nasty traceback, which hides the actual problem (some ImportError):

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/apps/gent/SL6/sandybridge/software/hanythingondemand/3.2.0-cli/lib/python2.6/site-packages/hanythingondemand-3.2.0-py2.6.egg/hod/main.py", line 92, in <module>
  File "/apps/gent/SL6/sandybridge/software/hanythingondemand/3.2.0-cli/lib/python2.6/site-packages/hanythingondemand-3.2.0-py2.6.egg/hod/main.py", line 80, in main
  File "/apps/gent/SL6/sandybridge/software/hanythingondemand/3.2.0-cli/lib/python2.6/site-packages/hanythingondemand-3.2.0-py2.6.egg/hod/subcommands/listcmd.py", line 90, in run
  File "/usr/lib/python2.7/site-packages/vsc/utils/fancylogger.py", line 322, in raiseException
    message += " (%s)" % detail
TypeError: unsupported operand type(s) for +=: 'exceptions.ImportError' and 'str'
stdweird commented 7 years ago

rebase? also 1st class copy/paste code....

boegel commented 7 years ago

Actual problem was a broken pbs_python module that was used by HOD, because it was installed on SL6 where the system Python was 2.6, and was then being used on CentOS7:

libpython2.6.so.1.0: cannot open shared object file: No such file or directory; required module 'pbs' is not available

Reinstalling the pbs_python module fixed the problem.

@stdweird You're right that this could use a bit of cleanup, I'll look into that.