{"action":"created","issue":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/37","labels_url":"https://api.github.com/repos/ganga-devs/ganga/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/issues/37/comments","events_url":"https://api.github.com/repos/ganga-devs/ganga/issues/37/events","html_url":"https://github.com/ganga-devs/ganga/issues/37","id":116078567,"number":37,"title":"Root() application doesn't handle arguments correctly","user":{"login":"olupton","id":6459623,"avatar_url":"https://avatars.githubusercontent.com/u/6459623?v=3","gravatar_id":"","url":"https://api.github.com/users/olupton","html_url":"https://github.com/olupton","followers_url":"https://api.github.com/users/olupton/followers","following_url":"https://api.github.com/users/olupton/following{/other_user}","gists_url":"https://api.github.com/users/olupton/gists{/gist_id}","starred_url":"https://api.github.com/users/olupton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olupton/subscriptions","organizations_url":"https://api.github.com/users/olupton/orgs","repos_url":"https://api.github.com/users/olupton/repos","events_url":"https://api.github.com/users/olupton/events{/privacy}","received_events_url":"https://api.github.com/users/olupton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/Core","name":"Core","color":"d4c5f9"},{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/LHCb","name":"LHCb","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-11-10T10:27:46Z","updated_at":"2015-11-10T12:57:21Z","closed_at":null,"body":"Since 6.1.13 I can't use the Root() application, as the generated command does not seem to escape the arguments properly.\r\n\r\nIn [455]:n.submit()\r\nGanga.GPIDev.Lib.Job               : INFO     submitting job 531\r\nGanga.GPIDev.Lib.Job               : INFO     job 531 status changed to \"submitting\"\r\nGanga.Lib.Root                     : INFO     Created shared directory: conf-135d3b33-2af2-4db8-b832-bcd2357f6c4b\r\nGanga.GPIDev.Adapters              : INFO     Sending file object /home/lupton/Kshh_svn/proctuples/makechain.cpp to shared directory\r\nGanga.GPIDev.Lib.Job               : INFO     Preparing subjobs\r\nGanga.Lib.Root                     : INFO     rootsys: /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_79/ROOT/6.04.02/x86_64-slc6-gcc48-opt\r\nGanga.GPIDev.Adapters              : INFO     submitting job 531 to Interactive backend\r\nGanga.Lib.Interactive              : INFO     Starting job 531\r\nGanga.GPIDev.Lib.Job               : INFO     job 531 status changed to \"submitted\"\r\n   ------------------------------------------------------------\r\n  | Welcome to ROOT 6.04/02                http://root.cern.ch |\r\n  |                               (c) 1995-2014, The ROOT Team |\r\n  | Built for linuxx8664gcc                                    |\r\n  | From tag v6-04-02, 14 July 2015                            |\r\n  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |\r\n   ------------------------------------------------------------\r\nroot [0]\r\nProcessing makechain.cpp(task-ddfix-MC.txt,D2KSHH_merged_PPLL-task-ddfix-MC,PPLL,/data/lhcb/users/lupton/akepahome/olupton/gangadir61/workspace/olupton/LocalXML/)...\r\ninput_line_15:2:12: error: use of undeclared identifier 'task'\r\n makechain(task-ddfix-MC.txt,D2KSHH_merged_PPLL-task-ddfix-MC,PPLL,/data/lhcb/users/lupton/akepahome/olupton/gangadir61/workspace/olupton/LocalXML/) /* invoking function corresponding to '.x' */\r\n           ^\r\ninput_line_15:2:17: error: use of undeclared identifier 'ddfix'\r\n makechain(task-ddfix-MC.txt,D2KSHH_merged_PPLL-task-ddfix-MC,PPLL,/data/lhcb/users/lupton/akepahome/olupton/gangadir61/workspace/olupton/LocalXML/) /* invoking function corresponding to '.x' */\r\n                ^\r\n\r\n....this carries on for many lines. Clearly the (string) argument is being interpreted as C++.\r\n\r\nThis test used the Interactive backend, and:\r\nIn [456]:n.application\r\nOut[456]: Root (\r\n is_prepared = ShareDir(name='conf-135d3b33-2af2-4db8-b832-bcd2357f6c4b',subdir='.') ,\r\n args = [task-ddfix-MC.txt, D2KSHH_merged_PPLL-task-ddfix-MC, PPLL, /data/lhcb/users/lupton/akepahome/olupton/gangadir61/workspace/olupton/LocalXML/]  ,\r\n version = '6.04.02' ,\r\n usepython = False ,\r\n script = File (\r\n    name = '/home/lupton/Kshh_svn/proctuples/makechain.cpp' ,\r\n    subdir = '.'\r\n    )\r\n )\r\n\r\nAs a related question, it is not clear how to pick between compiled (i.e. root script.C+) and interpreted (i.e. root script.C) running. Is this possible?\r\n\r\nThanks, Olli"},"comment":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/comments/155413161","html_url":"https://github.com/ganga-devs/ganga/issues/37#issuecomment-155413161","issue_url":"https://api.github.com/repos/ganga-devs/ganga/issues/37","id":155413161,"user":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T12:57:21Z","updated_at":"2015-11-10T12:57:21Z","body":"@olupton  As a quick fix defining your arguments as strings should help this, I'm surprised in the application that they're not wrapped in ```\"``` tags... this may be enough to continue what your doing.\r\n\r\nGanga cannot sensibly auto-add these parentheses to strings as there is a difference between passing ```5``` and ```\"5\"``` to ROOT scripts which has meant we try to avoid doing anything which could conflict with the users requirements here."}}