{"action":"created","issue":{"url":"https://api.github.com/repos/moloch--/RootTheBox/issues/88","labels_url":"https://api.github.com/repos/moloch--/RootTheBox/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/moloch--/RootTheBox/issues/88/comments","events_url":"https://api.github.com/repos/moloch--/RootTheBox/issues/88/events","html_url":"https://github.com/moloch--/RootTheBox/issues/88","id":78110903,"number":88,"title":"xml import fails","user":{"login":"admin-support","id":208368,"avatar_url":"https://avatars.githubusercontent.com/u/208368?v=3","gravatar_id":"","url":"https://api.github.com/users/admin-support","html_url":"https://github.com/admin-support","followers_url":"https://api.github.com/users/admin-support/followers","following_url":"https://api.github.com/users/admin-support/following{/other_user}","gists_url":"https://api.github.com/users/admin-support/gists{/gist_id}","starred_url":"https://api.github.com/users/admin-support/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/admin-support/subscriptions","organizations_url":"https://api.github.com/users/admin-support/orgs","repos_url":"https://api.github.com/users/admin-support/repos","events_url":"https://api.github.com/users/admin-support/events{/privacy}","received_events_url":"https://api.github.com/users/admin-support/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/moloch--/RootTheBox/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"moloch--","id":875022,"avatar_url":"https://avatars.githubusercontent.com/u/875022?v=3","gravatar_id":"","url":"https://api.github.com/users/moloch--","html_url":"https://github.com/moloch--","followers_url":"https://api.github.com/users/moloch--/followers","following_url":"https://api.github.com/users/moloch--/following{/other_user}","gists_url":"https://api.github.com/users/moloch--/gists{/gist_id}","starred_url":"https://api.github.com/users/moloch--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moloch--/subscriptions","organizations_url":"https://api.github.com/users/moloch--/orgs","repos_url":"https://api.github.com/users/moloch--/repos","events_url":"https://api.github.com/users/moloch--/events{/privacy}","received_events_url":"https://api.github.com/users/moloch--/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-05-19T14:27:26Z","updated_at":"2015-07-17T09:27:39Z","closed_at":null,"body":"When attempting to import already exported xml file the import fails.\r\nIn the gui you are given a 404, but if you do it commandline you get an error.\r\n\r\nuser@ubuntu:~/RootTheBox$ sudo ./rootthebox.py --xml data.xml\r\nTraceback (most recent call last):\r\n  File \"./rootthebox.py\", line 438, in <module>\r\n    options.parse_command_line()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tornado/options.py\", line 267, in parse_command_line\r\n    raise Error('Option %r requires a value' % name)\r\ntornado.options.Error: Option 'xml' requires a value\r\n\r\n\r\nYou get not feedback or no data in the database tables if you attempt to do the following command;\r\nuser@ubuntu:~/RootTheBox$ sudo ./rootthebox.py --xml=/home/user/RootTheBox/file.xml\r\nor\r\nuser@ubuntu:~/RootTheBox$ sudo ./rootthebox.py --xml=file.xml\r\nor\r\nuser@ubuntu:~/RootTheBox$ sudo ./rootthebox.py --xml=\"file.xml\"\r\n\r\n\r\nThe rtb.log contains the following;\r\n[E 150519 07:16:17 BaseHandlers:189] Request from 127.0.0.1 resulted in an error code 500:\r\n    Traceback (most recent call last):\r\n      File \"/usr/local/lib/python2.7/dist-packages/tornado/web.py\", line 1346, in _execute\r\n        result = method(*self.path_args, **self.path_kwargs)\r\n      File \"/home/user/RootTheBox/libs/SecurityDecorators.py\", line 63, in wrapper\r\n        return method(self, *args, **kwargs)\r\n      File \"/home/user/RootTheBox/libs/SecurityDecorators.py\", line 38, in wrapper\r\n        return method(self, *args, **kwargs)\r\n      File \"/home/user/RootTheBox/libs/SecurityDecorators.py\", line 93, in wrapper\r\n        return method(self, *args, **kwargs)\r\n      File \"/home/user/RootTheBox/handlers/AdminHandlers/AdminGameHandlers.py\", line 424, in post\r\n        if import_xml(fxml):\r\n    NameError: global name 'import_xml' is not defined"},"comment":{"url":"https://api.github.com/repos/moloch--/RootTheBox/issues/comments/122227983","html_url":"https://github.com/moloch--/RootTheBox/issues/88#issuecomment-122227983","issue_url":"https://api.github.com/repos/moloch--/RootTheBox/issues/88","id":122227983,"user":{"login":"admin-support","id":208368,"avatar_url":"https://avatars.githubusercontent.com/u/208368?v=3","gravatar_id":"","url":"https://api.github.com/users/admin-support","html_url":"https://github.com/admin-support","followers_url":"https://api.github.com/users/admin-support/followers","following_url":"https://api.github.com/users/admin-support/following{/other_user}","gists_url":"https://api.github.com/users/admin-support/gists{/gist_id}","starred_url":"https://api.github.com/users/admin-support/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/admin-support/subscriptions","organizations_url":"https://api.github.com/users/admin-support/orgs","repos_url":"https://api.github.com/users/admin-support/repos","events_url":"https://api.github.com/users/admin-support/events{/privacy}","received_events_url":"https://api.github.com/users/admin-support/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T09:27:39Z","updated_at":"2015-07-17T09:27:39Z","body":"I was trying to import an exported xml created from the RTB scoring engine as well. So just directly exported the config and tried to import it again. No custom XML to mention, so if you try n01g3L's solution I think you will fix this bug as well."}}