Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k4run crashes when invoked without arguments #109

Closed
tmadlener opened this issue Jun 15, 2023 · 2 comments · Fixed by #110
Closed

k4run crashes when invoked without arguments #109

tmadlener opened this issue Jun 15, 2023 · 2 comments · Fixed by #110

Comments

@tmadlener
Copy link
Contributor

Originally reported here: key4hep/key4hep-spack#498

* ********************************************************************
* Welcome to lxplus924.cern.ch, AlmaLinux release 9.2 (Turquoise Kodkod)
* Archive of news is available in /etc/motd-archive
* Reminder: you have agreed to the CERN
*   computing rules, in particular OC5. CERN implements
*   the measures necessary to ensure compliance.
*   https://cern.ch/ComputingRules
* Puppet environment: production, Roger state: production
* Foreman hostgroup: lxplus/nodes/login
* Availability zone: cern-geneva-b
* LXPLUS Public Login Service - http://lxplusdoc.web.cern.ch/
* An AlmaLinux8 based lxplus8.cern.ch is now available
* Please read LXPLUS Privacy Notice in http://cern.ch/go/TpV7
* ********************************************************************
Last login: Thu Jun 15 14:35:46 2023 from 2001:1458:202:96::101:4142
~$ source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh 
AlmaLinux 9 detected
Setting up the latest Key4HEP software stack from CVMFS ...
 ...  Key4HEP release: 2023-06-15
 ...  Use the following command to reproduce the current environment: 
 ... 
         source /cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-15/x86_64-almalinux9-gcc11.3.1-opt/key4hep-stack/2023-06-15-zkepcb/setup.sh
 ... 
 ...  If you have any issues, comments or requests open an issue at https://github.com/key4hep/key4hep-spack/issues
~$ k4run
Traceback (most recent call last):
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-15/x86_64-almalinux9-gcc11.3.1-opt/k4fwcore/348be068b687353f2886421110190aaa682bd293=develop-yyw2xj/bin/k4run", line 113, in <module>
    opts = parser.parse_known_args()
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-10/x86_64-almalinux9-gcc11.3.1-opt/python/3.10.10-mbuvpt/lib/python3.10/argparse.py", line 1859, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-10/x86_64-almalinux9-gcc11.3.1-opt/python/3.10.10-mbuvpt/lib/python3.10/argparse.py", line 2075, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-10/x86_64-almalinux9-gcc11.3.1-opt/python/3.10.10-mbuvpt/lib/python3.10/argparse.py", line 2031, in consume_positionals
    take_action(action, args)
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-10/x86_64-almalinux9-gcc11.3.1-opt/python/3.10.10-mbuvpt/lib/python3.10/argparse.py", line 1936, in take_action
    action(self, namespace, argument_values, option_string)
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2023-06-15/x86_64-almalinux9-gcc11.3.1-opt/k4fwcore/348be068b687353f2886421110190aaa682bd293=develop-yyw2xj/bin/k4run", line 37, in __call__
    for conf in dict.fromkeys(ApplicationMgr.allConfigurables.values()):
NameError: name 'ApplicationMgr' is not defined
~$ 

This looks like some import is missing, although I am also not entirely sure whether argparse could be made to intervene earlier if launched without arguments.

@vvolkl
Copy link
Contributor

vvolkl commented Jun 15, 2023

Right, I thought it was an environment issue, but that was likely introduced in #93

@vvolkl
Copy link
Contributor

vvolkl commented Jun 15, 2023

Works with the latest release:

~$ source /cvmfs/sw.hsf.org/spackages6/key4hep-stack/2022-12-23/x86_64-centos7-gcc11.2.0-opt/ll3gi/setup.sh 
~$ k4run
usage: k4run [gaudi_config.py ...] Specify a gaudi options file to run
~$ ^C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants