{"action":"created","issue":{"url":"https://api.github.com/repos/Esri/ArcREST/issues/198","repository_url":"https://api.github.com/repos/Esri/ArcREST","labels_url":"https://api.github.com/repos/Esri/ArcREST/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/Esri/ArcREST/issues/198/comments","events_url":"https://api.github.com/repos/Esri/ArcREST/issues/198/events","html_url":"https://github.com/Esri/ArcREST/issues/198","id":144590167,"number":198,"title":"generateKML for map service -  urllib2.HTTPError: HTTP Error 400: Bad Request","user":{"login":"AlexArcPy","id":7373268,"avatar_url":"https://avatars.githubusercontent.com/u/7373268?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexArcPy","html_url":"https://github.com/AlexArcPy","followers_url":"https://api.github.com/users/AlexArcPy/followers","following_url":"https://api.github.com/users/AlexArcPy/following{/other_user}","gists_url":"https://api.github.com/users/AlexArcPy/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexArcPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexArcPy/subscriptions","organizations_url":"https://api.github.com/users/AlexArcPy/orgs","repos_url":"https://api.github.com/users/AlexArcPy/repos","events_url":"https://api.github.com/users/AlexArcPy/events{/privacy}","received_events_url":"https://api.github.com/users/AlexArcPy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Esri/ArcREST/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"achapkowski","id":5131271,"avatar_url":"https://avatars.githubusercontent.com/u/5131271?v=3","gravatar_id":"","url":"https://api.github.com/users/achapkowski","html_url":"https://github.com/achapkowski","followers_url":"https://api.github.com/users/achapkowski/followers","following_url":"https://api.github.com/users/achapkowski/following{/other_user}","gists_url":"https://api.github.com/users/achapkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/achapkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achapkowski/subscriptions","organizations_url":"https://api.github.com/users/achapkowski/orgs","repos_url":"https://api.github.com/users/achapkowski/repos","events_url":"https://api.github.com/users/achapkowski/events{/privacy}","received_events_url":"https://api.github.com/users/achapkowski/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-30T13:17:16Z","updated_at":"2016-03-30T13:37:46Z","closed_at":null,"body":"I am on ArcREST Version 3.5.3 Release.\r\n\r\nWhen trying to generate a KML file, an error is returned:\r\n```urllib2.HTTPError: HTTP Error 400: Bad Request```\r\n\r\nThe code breaks at this line:\r\n\r\n`resp = opener.open(fullurl=format_url)`\r\n\r\nIn the file `arcrest/web/_base.py`\r\n\r\n`format_url` has the value of \r\n```\r\n'http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer/generateKml?docName=SampleKML&layers=1&layerOptions=composite&f=json?token=80bbvISXd4eTJXc2Whn4MmlSUvFZPy4m6KaC0pEx0KdJHtABCq_rDWG1cRa79YxH'\r\n```\r\nbefore it's being executed.\r\n\r\nIf navigating to the URL that is built in the code in the browser, the .kmz is generated as expected.\r\n\r\n```\r\nhttp://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer/generateKml?docName=SampleKML&layers=1&layerOptions=composite&f=json\r\n```"},"comment":{"url":"https://api.github.com/repos/Esri/ArcREST/issues/comments/203437083","html_url":"https://github.com/Esri/ArcREST/issues/198#issuecomment-203437083","issue_url":"https://api.github.com/repos/Esri/ArcREST/issues/198","id":203437083,"user":{"login":"achapkowski","id":5131271,"avatar_url":"https://avatars.githubusercontent.com/u/5131271?v=3","gravatar_id":"","url":"https://api.github.com/users/achapkowski","html_url":"https://github.com/achapkowski","followers_url":"https://api.github.com/users/achapkowski/followers","following_url":"https://api.github.com/users/achapkowski/following{/other_user}","gists_url":"https://api.github.com/users/achapkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/achapkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achapkowski/subscriptions","organizations_url":"https://api.github.com/users/achapkowski/orgs","repos_url":"https://api.github.com/users/achapkowski/repos","events_url":"https://api.github.com/users/achapkowski/events{/privacy}","received_events_url":"https://api.github.com/users/achapkowski/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T13:37:46Z","updated_at":"2016-03-30T13:37:46Z","body":"What version of server are you using?"}}