SiWECAL-TestBeam / SiWECAL-TB-monitoring

Event-based almost-online monitoring for the SiW ECAL
GNU General Public License v3.0
0 stars 3 forks source link

Enforce minimum python version #16

Closed kunathj closed 2 years ago

kunathj commented 2 years ago

Give a clear error message if the python3 version is too old. Note that this is anyways a good sign that you are trying to use the system python3 instead of a version that is linked with ROOT. The minimum should be whatever is tested on GitHub actions. I believe this is python3.8.

Click for error Traceback on lxplus ```bash β•­β”€πŸ§€ jokunath@lxplus743 in ~/p/SiWECAL-TB-monitoring on ξ‚  main via 🐍 v2.7.5 via 🐏 7GiB/29GiB | 543MiB/10GiB β•°β”€β”€βœ— ./start_monitoring_run.py /eos/project-s/siw-ecal/TB2022-03/commissioning/data/03112022/ Traceback (most recent call last): File "./start_monitoring_run.py", line 730, in monitoring = EcalMonitoring(**vars(parser.parse_args())) File "./start_monitoring_run.py", line 189, in __init__ self._validate_computing_environment() File "./start_monitoring_run.py", line 206, in _validate_computing_environment subprocess.run(["root", "--version"], capture_output=True) File "/usr/lib64/python3.6/subprocess.py", line 423, in run with Popen(*popenargs, **kwargs) as process: TypeError: __init__() got an unexpected keyword argument 'capture_output' ```
kunathj commented 2 years ago

Improved error message.

Click for error Traceback on lxplus ```bash β•­β”€πŸ§€ jokunath@lxplus766 in ~/monitoring on ξ‚  main via 🐍 v2.7.5 via 🐏 16GiB/29GiB | 2GiB/10GiB β•°β”€β”€βœ— ./start_monitoring_run.py ~/tb/beamData/ascii/3.2GeV_W_run_050208/ πŸ₯¨No data quality info and plots will be provided. No module named 'awkward' env_py_v= __init__() got an unexpected keyword argument 'capture_output' Traceback (most recent call last): File "./start_monitoring_run.py", line 318, in _validate_computing_environment ret = subprocess.run(["python", "--version"], capture_output=True) File "/usr/lib64/python3.6/subprocess.py", line 423, in run with Popen(*popenargs, **kwargs) as process: TypeError: __init__() got an unexpected keyword argument 'capture_output' 🐌Using pyROOT with python2 for eventbuilding is not technically forbidden, but discouraged for performance reasons: . β›”Aborted. The monitoring needs at least Python 3.8 (). πŸ’‘Hint: If you do not have the environment set up locally but do have access to cvmfs, try an LCG view (adapt `x86_64-centos7-gcc11-opt` for your OS) source /cvmfs/sft.cern.ch/lcg/views/LCG_101/x86_64-centos7-gcc11-opt/setup.sh ```